You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Status

Current state: Under Discussion

Discussion thread: here

JIRA: KAFKA-15248

Motivation

KIP-907 introduced new SerDes for Booleans in the org.apache.kafka.common.serialization package. This small KIP proposes extending the new SerDes to Kafka Connect, by adding a new org.apache.kafka.connect.converter.BooleanConverter class to convert from/to org.apache.kafka.connect.data.Schema.Type.BOOLEAN types.

Public Interfaces

A new BooleanConverter class will be added to the org.apache.kafka.connect.converter package implementing the org.apache.kafka.connect.storage.Converter and org.apache.kafka.connect.storage.HeaderConverter interfaces.

Proposed Changes

Most of the Connect Schema primitive types have converters that are used for serialization. This KIP proposes using the newly added BooleanSerializer / BooleanDeserializer classes to add support for booleans as well.

Compatibility, Deprecation, and Migration Plan

  • As this is a new converter, there's no impact on existing connect users.

Test Plan

  • New BooleanConverterTest will be added to the connect/runtime test suite

Rejected Alternatives

Users who want to convert from/to Type.BOOLEAN can implement their own converter (the implementation is rather simple)

  • No labels