Current state: Accepted
Discussion thread: here
Kafka exposes serialization/deserialization classes for multiple types such as ByteArray, Double, Float etc, in 'org.apache.kafka.common.serialization' package which is part of public interface. During the task KAFKA-14491 Victoria added BooleanSerde class, It will be useful to have such class in public package.
- 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.
Compatibility, Deprecation, and Migration Plan
- What impact (if any) will there be on existing users?
- New Serde for Boolean type.
- If we are changing behavior how will we phase out the older behavior?
- Update NullableValueAndTimestampSerde.java file, to use public class for Serde
- If we need special migration tools, describe them here.
- When will we remove the existing behavior?
I think that in that case unit-tests are sufficient, since the proposed change is a new simple feature it doesn't need system tests.