You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Evgeny Veretennikov (JIRA)" <ji...@apache.org> on 2017/11/02 18:29:00 UTC

[jira] [Updated] (KAFKA-6161) Introduce new serdes interfaces with empty configure() and close()

     [ https://issues.apache.org/jira/browse/KAFKA-6161?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Evgeny Veretennikov updated KAFKA-6161:
---------------------------------------
    Summary: Introduce new serdes interfaces with empty configure() and close()  (was: Make configure() and close() empty by default in serde interfaces)

> Introduce new serdes interfaces with empty configure() and close()
> ------------------------------------------------------------------
>
>                 Key: KAFKA-6161
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6161
>             Project: Kafka
>          Issue Type: Improvement
>          Components: clients
>            Reporter: Evgeny Veretennikov
>            Assignee: Evgeny Veretennikov
>            Priority: Normal
>
> {{Serializer}}, {{Deserializer}} and {{Serde}} interfaces have methods {{configure()}} and {{close()}}. Pretty often one want to leave these methods empty. For example, a lot of serializers inside {{org.apache.kafka.common.serialization}} package have these methods empty:
> {code}
> @Override
> public void configure(Map<String, ?> configs, boolean isKey) {
>     // nothing to do
> }
> @Override
> public void close() {
>     // nothing to do
> }
> {code}
> Since we switched to source level 1.8 for javac, we can make these methods empty by default.
> As another option, we may create new interfaces (like {{UnconfiguredSerializer}}), in which we will define these methods empty, but just making methods default seems more convenient.
> As a side note, making methods default shouldn't be binary incompatible. So, seems like it's safe to make this change.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)