kafka-jira mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Evgeny Veretennikov (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KAFKA-6161) Make configure() and close() empty by default in serde interfaces
Date Thu, 02 Nov 2017 18:28:02 GMT

    [ https://issues.apache.org/jira/browse/KAFKA-6161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16236334#comment-16236334
] 

Evgeny Veretennikov commented on KAFKA-6161:
--------------------------------------------

Oops, didn't notice, that source compatibility is still 1.7. Will rewrite this issue...

> Make configure() and close() empty by default in serde interfaces
> -----------------------------------------------------------------
>
>                 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)

Mime
View raw message