-
Notifications
You must be signed in to change notification settings - Fork 42
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
#313 solved serializers casting problems using SpecificDatumWriter #315
#313 solved serializers casting problems using SpecificDatumWriter #315
Conversation
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.
Thank you for collaborating with the project to help us to improve!!'
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 think the pom version needs to be updated.
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.
Pom version should be updated
7a92079
…b.com:corunet/kloadgen into 313-issue-long-timestamp-millis-trouble-to-cast
I have added a new docker file from the #303 issue branch. I think it can be usefull to test the plugin. |
All changes requested have been committed. Please @jemacineiras review them when you have time. |
…sed specific datum writer in serializers
I have added new tests for the serializers. I also removed the use of SpecificDatumWritter from both serializers affected by the issue because it was never used. The reason of this was that serializers data was always of type GenericRecord and not SpecificRecord. |
@@ -21,7 +24,12 @@ | |||
|
|||
@Override | |||
public final byte[] serialize(final String s, final T data) { | |||
final var writer = new SpecificDatumWriter<>(data.getSchema()); | |||
DatumWriter<T> writer; | |||
if (data instanceof SpecificRecord) { |
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.
Missing test
@@ -23,7 +26,13 @@ | |||
@Override | |||
public final byte[] serialize(final String topic, final T data) { | |||
|
|||
final var writer = new SpecificDatumWriter<>(data.getSchema()); | |||
DatumWriter<T> writer; | |||
if (data instanceof SpecificRecord) { |
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.
Missing test
The casting problem of long_timestamp-millis gets solved when using the GenericDatumWriter. Despite the lack of documentation it seems that we should use SpecificDatumWriter only when needed.