-
Notifications
You must be signed in to change notification settings - Fork 3.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pulsar Client: allow to print GenericRecord contents #9785
Pulsar Client: allow to print GenericRecord contents #9785
Conversation
@codelipenghui @wolfstudy @rdhabalia please help merging this patch. |
import java.util.Base64; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.*; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's better to avoid the star import.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@codelipenghui it was my IDE.
we should have checkstyle to block this issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have fixed it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I think the check style plugin does not enable for this module, so...
@eolivelli thanks for your work, could you pls add docs for this PR? |
@Anonymitaet I added docs in the pulsar-client section. |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
@eolivelli Many thanks for your docs. |
/pulsarbot run-failure-checks |
@codelipenghui @zymap this patch has been approved, can you please help me merging to master branch ? |
/pulsarbot run-failure-checks |
1 similar comment
/pulsarbot run-failure-checks |
/pulsarbot run-failure-checks |
/pulsarbot rerun-failure-checks |
2 similar comments
/pulsarbot rerun-failure-checks |
/pulsarbot rerun-failure-checks |
@codelipenghui @rdhabalia I am not sure why pulsarbot it not going to rerun the failed tests. |
@eolivelli I have rerun through the Github UI. |
Tests are always failing for errors unrelated to this patch. |
/pulsarbot rerun-failure-checks |
3 similar comments
/pulsarbot rerun-failure-checks |
/pulsarbot rerun-failure-checks |
/pulsarbot rerun-failure-checks |
### Motivation When you are dealing with structured data it would be pretty useful to have a tool that prints decoded records directly to the console. ### Modifications Add two new options to the "pulsar-client consume" tool: - "--schema-type" option, that can be "bytes" and "auto_consume" in order to select the Schema (in particular you are interested in AUTO_CONSUME if you are dealing with GenericRecords) - "--hide-content" boolean option, that shuts down the printing of the contents of the messages, in case they are in binary form or that you are using the tool only to test if any message is coming from the topic In case of GenericRecords we are printing the content of the record like a Java Map. We are also handling nested GenericRecord structures as well.
Motivation
When you are dealing with structured data it would be pretty useful to have a tool that prints decoded records directly to the console.
Modifications
Add two new options to the "pulsar-client consume" tool:
In case of GenericRecords we are printing the content of the record like a Java Map. We are also handling nested GenericRecord structures as well.