-
Notifications
You must be signed in to change notification settings - Fork 41
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
422 issue nullpointerexception when starting a test with a key schema file serializer config #426
Changes from 15 commits
68ce277
05617cc
7fe3907
c899739
3aad255
bcdfeee
df11822
9c4a8c7
ad60d96
e950597
12d6c68
e13b8f2
62984b9
0b1e98e
d8bba55
6d7fec5
b26a37e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -179,5 +179,4 @@ public final Component getCustomEditor() { | |
public final boolean supportsCustomEditor() { | ||
return true; | ||
} | ||
|
||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.sngular.kloadgen.serializer; | ||
|
||
import java.util.Map; | ||
|
||
import org.apache.kafka.common.serialization.StringSerializer; | ||
|
||
public final class CustomStringEnrichedRecordSerializer<T extends EnrichedRecord> implements EnrichedRecordSerializer<T> { | ||
private final StringSerializer stringSerializer; | ||
|
||
public CustomStringEnrichedRecordSerializer() { | ||
stringSerializer = new StringSerializer(); | ||
} | ||
|
||
public void configure(final Map<String, ?> configs, final boolean isKey) { | ||
stringSerializer.configure(configs, isKey); | ||
} | ||
|
||
public byte[] serialize(final String topic, final EnrichedRecord data) { | ||
return stringSerializer.serialize(topic, data.toString()); | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.sngular.kloadgen.serializer; | ||
|
||
import org.apache.kafka.common.serialization.Serializer; | ||
|
||
public interface EnrichedRecordSerializer<T extends EnrichedRecord> extends Serializer<T> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There is no sense on that. Rethink. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a tag for those serializers that can accept a EnricherdRecord, instead of a GenericRecordSerializer. Is there a way to query this programatically? |
||
|
||
} |
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 is is not needed.
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 don't understand. Isn't the
package
line always needed for classes?