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

2018-06-30 Thread Chia-Ping Tsai (JIRA)


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

Chia-Ping Tsai commented on KAFKA-6161:
---

I will take over this Jira tomorrow. [~evis] Feel free to stop me.:) 

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-12 Thread Chia-Ping Tsai (JIRA)


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

Chia-Ping Tsai commented on KAFKA-6161:
---

[~ewencp] Got it. thanks!

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-12 Thread Ewen Cheslack-Postava (JIRA)


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

Ewen Cheslack-Postava commented on KAFKA-6161:
--

[~chia7712] Really up to [~evis] (we prefer to have existing assignee pass 
ownership on), but if we don't hear back, then sure, feel free to re-assign to 
yourself.

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-12 Thread Chia-Ping Tsai (JIRA)


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

Chia-Ping Tsai commented on KAFKA-6161:
---

I'm going to write the KIP. [~ewencp] Could I take over this jira?

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-06 Thread Chia-Ping Tsai (JIRA)


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

Chia-Ping Tsai commented on KAFKA-6161:
---

{quote}that was more of an offer that if someone wants to move this forward 
they could update relevant parts, sort out any KIP necessary, and file PR. 
{quote}
Could I take this ticket? Or [~evis] do you still have interest in this jira?

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-06 Thread Ewen Cheslack-Postava (JIRA)


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

Ewen Cheslack-Postava commented on KAFKA-6161:
--

lol, thanks for the offer [~mjsax], that was more of an offer that if someone 
wants to move this forward they could update relevant parts, sort out any KIP 
necessary, and file PR. I added `needs-kip` annotation, which I clearly missed 
in an earlier comment when I mentioned it needs a KIP to make compatibility 
clear, though we might be able to skip that as of JDK8 support.

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-06 Thread Matthias J. Sax (JIRA)


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

Matthias J. Sax commented on KAFKA-6161:


[~ewencp] Feel free to upgrade the Jira description accordingly.

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-06 Thread Ewen Cheslack-Postava (JIRA)


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

Ewen Cheslack-Postava commented on KAFKA-6161:
--

I think it is now a compatible change to just provide default impls, but we 
should have some documentation that this is true. If it is the case, we can 
have a very minimal KIP process and just add the default impls, as long as the 
KIP discussion also agrees on the correct default implementations (the 
compatibility isn't the only issue – we also need to agree on a valid default 
implementation).

Note that this is a bit different than the original request for an alternative 
set of interfaces that provide these by default. Given we can use default impls 
now, we'd probably also want to revise the description of this JIRA.

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>  Labels: needs-kip
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-06 Thread Chia-Ping Tsai (JIRA)


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

Chia-Ping Tsai commented on KAFKA-6161:
---

{quote}Since we have migrated to JDK8 now in 2.0, should we restart picking up 
on this one?
{quote}
Agreed. We can add the default impl to the close() and configure() so the 
Serializer and Deserializer can be the functional interface. It has chance to 
make the subclass simpler.

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-03 Thread Guozhang Wang (JIRA)


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

Guozhang Wang commented on KAFKA-6161:
--

Since we have migrated to JDK8 now in 2.0, should we restart picking up on this 
one?

> 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, streams
>Reporter: Evgeny Veretennikov
>Assignee: Evgeny Veretennikov
>Priority: Major
>
> {{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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


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

2018-06-03 Thread ASF GitHub Bot (JIRA)


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

ASF GitHub Bot commented on KAFKA-6161:
---

guozhangwang closed pull request #4175: KAFKA-6161 add base classes for 
(De)Serializers with empty conf methods
URL: https://github.com/apache/kafka/pull/4175
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteArrayDeserializer.java
 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteArrayDeserializer.java
index 267211576b6..1c16b0bfc42 100644
--- 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteArrayDeserializer.java
+++ 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteArrayDeserializer.java
@@ -16,22 +16,10 @@
  */
 package org.apache.kafka.common.serialization;
 
-import java.util.Map;
-
-public class ByteArrayDeserializer implements Deserializer {
-
-@Override
-public void configure(Map configs, boolean isKey) {
-// nothing to do
-}
+public class ByteArrayDeserializer extends NoConfDeserializer {
 
 @Override
 public byte[] deserialize(String topic, byte[] data) {
 return data;
 }
-
-@Override
-public void close() {
-// nothing to do
-}
 }
diff --git 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteArraySerializer.java
 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteArraySerializer.java
index d069e9495e6..f5057b362a3 100644
--- 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteArraySerializer.java
+++ 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteArraySerializer.java
@@ -16,22 +16,10 @@
  */
 package org.apache.kafka.common.serialization;
 
-import java.util.Map;
-
-public class ByteArraySerializer implements Serializer {
-
-@Override
-public void configure(Map configs, boolean isKey) {
-// nothing to do
-}
+public class ByteArraySerializer extends NoConfSerializer {
 
 @Override
 public byte[] serialize(String topic, byte[] data) {
 return data;
 }
-
-@Override
-public void close() {
-// nothing to do
-}
 }
diff --git 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferDeserializer.java
 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferDeserializer.java
index d41f03c6675..ad22796c07f 100644
--- 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferDeserializer.java
+++ 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferDeserializer.java
@@ -17,13 +17,8 @@
 package org.apache.kafka.common.serialization;
 
 import java.nio.ByteBuffer;
-import java.util.Map;
 
-public class ByteBufferDeserializer implements Deserializer {
-
-public void configure(Map configs, boolean isKey) {
-// nothing to do
-}
+public class ByteBufferDeserializer extends NoConfDeserializer {
 
 public ByteBuffer deserialize(String topic, byte[] data) {
 if (data == null)
@@ -31,8 +26,4 @@ public ByteBuffer deserialize(String topic, byte[] data) {
 
 return ByteBuffer.wrap(data);
 }
-
-public void close() {
-// nothing to do
-}
 }
diff --git 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferSerializer.java
 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferSerializer.java
index c8c369272dd..ee3689a8a88 100644
--- 
a/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferSerializer.java
+++ 
b/clients/src/main/java/org/apache/kafka/common/serialization/ByteBufferSerializer.java
@@ -17,13 +17,8 @@
 package org.apache.kafka.common.serialization;
 
 import java.nio.ByteBuffer;
-import java.util.Map;
 
-public class ByteBufferSerializer implements Serializer {
-
-public void configure(Map configs, boolean isKey) {
-// nothing to do
-}
+public class ByteBufferSerializer extends NoConfSerializer {
 
 public byte[] serialize(String topic, ByteBuffer data) {
 if (data == null)
@@ -43,8 +38,4 @@ public void configure(Map configs, boolean isKey) {
 data.rewind();
 return ret;
 }
-
-public void close() {
-// nothing to do
-}
 }
diff --git 
a/clients/src/main/java/org/apache/kafka/common/serialization/BytesDeserializer.java
 
b/clients/src/main/java/org/apache/kafka/common/serialization/BytesDeserializer.java
index 66b07eb5841..b912ef5b40c 100644
--- 
a/clients/src/main/java/org/apache/kafka/common/serialization/BytesDeserializer.java
+++ 
b/clients/src/main/java/org/apache/kafka/common/seria

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

2017-11-04 Thread Ewen Cheslack-Postava (JIRA)

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

Ewen Cheslack-Postava commented on KAFKA-6161:
--

It would need a KIP as new public API, but wouldn't necessarily break 
compatibility. It could be done as an abstract class or it's possible to just 
detect the type before making any of the affected calls (which are rare, so 
just checking right at the call site would be fine).

However, I agree with [~ckamal] that it seems better to just wait until we 
update to JDK8 and fill in the default implementations in the interface if that 
doesn't break compatibility. I'm a bit unclear on the timeframe for that though 
since I think it is tied to the 2.0 release and the number of minor releases 
for a given major release can vary.

> 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, streams
>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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



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


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

2017-11-04 Thread Matthias J. Sax (JIRA)

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

Matthias J. Sax commented on KAFKA-6161:


>From my understanding, this breaks Java byte code backward compatibility and 
>thus we might need a KIP. \cc [~guozhang] [~ewencp] WDYT?

> 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, streams
>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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



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


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

2017-11-03 Thread Kamal Chandraprakash (JIRA)

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

Kamal Chandraprakash commented on KAFKA-6161:
-

My opinion is that we can do these cleanups when Kafka source code migrates to 
Java 8. In Java 8, we can define `default` method in the interface. Now, with 
your current patch, we cannot extend any more classes in `Serde` / `Serializer` 
and `DeSerializer`.

> 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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



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


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

2017-11-03 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on KAFKA-6161:
---

GitHub user evis opened a pull request:

https://github.com/apache/kafka/pull/4175

KAFKA-6161 add base classes for (De)Serializers with empty conf methods

All (de)serializers, which have empty configure() and/or close() methods, 
are now inherit NoConf(De)Serializer. Also, such classes are created for 
extended (de)serializers.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/evis/kafka 
KAFKA-6161-serde-empty-conf-close-methods

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/kafka/pull/4175.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #4175


commit 297115a53f6ea6c1bfd2383c0f73f011cb94c505
Author: Evgeny Veretennikov 
Date:   2017-11-03T15:38:18Z

KAFKA-6161 add base classes for (De)Serializers with empty conf methods

All (de)serializers, which have empty configure() and/or close()
methods, are now inherit NoConf(De)Serializer. Also, such classes are
created for extended (de)serializers.




> 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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



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


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

2017-11-02 Thread Evgeny Veretennikov (JIRA)

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

Evgeny Veretennikov commented on KAFKA-6161:


Changed issue.

> 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 configs, boolean isKey) {
> // nothing to do
> }
> @Override
> public void close() {
> // nothing to do
> }
> {code}
> To avoid such boilerplate, we may create new interfaces (like 
> {{UnconfiguredSerializer}}), in which we will define these methods empty.



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