Status
Current state: Under DiscussionAccepted
Discussion thread: here
Voting Discussion thread: here (full history)
JIRA:
Jira |
---|
server | ASF JIRA |
---|
columnIds | issuekey,summary,issuetype,created,updated,duedate,assignee,reporter,customfield_12311032,customfield_12311037,customfield_12311022,customfield_12311027,priority,status,resolution |
---|
columns | key,summary,type,created,updated,due,assignee,reporter,Priority,Priority,Priority,Priority,priority,status,resolution |
---|
serverId | 5aa69414-a9e9-3523-82ec-879b028fb15b |
---|
key | KAFKA-14722 |
---|
|
...
Code Block |
---|
title | method: serdeFrom, exception message |
---|
|
throw new IllegalArgumentException("Unknown class for built-in serializer. Supported types are: " +
"String, Short, Integer, Long, Float, Double, ByteArray, ByteBuffer, Bytes, UUID, Boolean"); |
Code Block |
---|
title | BooleanSerializer class |
---|
|
public class BooleanSerializer implements Serializer<Boolean> {
[...]
public byte[] serialize(final String topic, final Boolean data) { [...] }
} |
Code Block |
---|
title | BooleanDeserializer class |
---|
|
public class BooleanDeserializer implements Deserializer<Boolean> {
[...]
public Boolean deserialize(final String topic, final byte[] data) { [...] }
} |
Proposed Changes
- Add Boolean Serde to a org/apache/kafka/common/serialization package
- Add static public final class to the Serdes.java, update serdeFrom method, add Boolean() method that returns BooleanSerde();
- Create BooleanSerializer class in BooleanSerializer.java file, based on what is in NullableValueAndTimestampSerde.java
- Create BooleanDeserializer class in BooleanDeserializer.java file, based on what is in NullableValueAndTimestampSerde.java
- Rewrite NullableValueAndTimestampSerde.java file, package: org.apache.kafka.streams.state.internals so that it uses BooleanSerde from common/serialization instead of having own private class.
...