GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — Avro format implementation by sunng87 · Pull Request #407 · cloudevents/sdk-java Conversation
|
|
What is the relation of this to the content mode as defined in the Kafka Protocol Binding? Do I read correctly that this PR corresponds to the structured mode, but not to the binary? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I would expect some reference to the schema-registry maintaining the avro schemas. Am I missing something? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
This patch is to implement Avro as a cloudevent serialization format. It doesn't cover kafka binding for now. Perhaps we can provide that integration in future. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Awesome @sunng87!
I left some comments/questions/suggestions.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| public AvroCloudEventDataWrapper(Map<String, Object> data) { | ||
| avroCloudEventData = new AvroCloudEventData(); | ||
| avroCloudEventData.setValue(data); | ||
| } |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can we inject AvroCloudEventData directly?
| public AvroCloudEventDataWrapper(Map<String, Object> data) { | |
| avroCloudEventData = new AvroCloudEventData(); | |
| avroCloudEventData.setValue(data); | |
| } | |
| public AvroCloudEventDataWrapper(AvroCloudEventData avroCloudEventData) { | |
| this.avroCloudEventData = Objects.requireNonNull(avroCloudEventData); | |
| } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
The reason I'm using a map here is I tried to avoid exposing generated data type in a public api. The AvroCloudEventData contains some Avro serialization logic.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
OK, sounds good!
Can we add only the Objects.requireNonNull check?
| public AvroCloudEventDataWrapper(Map<String, Object> data) { | |
| avroCloudEventData = new AvroCloudEventData(); | |
| avroCloudEventData.setValue(data); | |
| } | |
| public AvroCloudEventDataWrapper(Map<String, Object> data) { | |
| avroCloudEventData = new AvroCloudEventData(); | |
| avroCloudEventData.setValue(Objects.requireNonNull(data)); | |
| } |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
| Map<String, Object> testData = Map.of("name", "Ning", "age", 22.0); | ||
|
|
||
| @Test | ||
| public void testSerde() { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Can we add more test cases?
CloudEventBuilder.v03())AvroCloudEventDataWrapper (we can create a new class AvroCloudEventDataWrapperTest for thisdata field (null included): https://github.com/cloudevents/sdk-java/pull/407/files#diff-09cbc79dec7471fa039c796a1fdfc9f13013cb7e9636e23bc32687378f59cb2aR23-R60
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will do it in next few commits.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
123bf68 to
4732e2d
Compare
Signed-off-by: Ning Sun <[email protected]>
d9fe8c4 to
37c4a56
Compare
Signed-off-by: Ning Sun <[email protected]>
37c4a56 to
3af281b
Compare
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
hi @pkgonan I'm no longer working on this. Feel free to fork and continue this work |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
At least 1 approving review is required to merge this pull request.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
Modularization: avro module
There was an error while loading. Please reload this page.