kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ewe...@apache.org
Subject kafka git commit: MINOR: Small enhancement to Deserializer Javadoc
Date Mon, 25 Jul 2016 18:03:58 GMT
Repository: kafka
Updated Branches:
  refs/heads/trunk 932bb84c8 -> aebab7cab


MINOR: Small enhancement to Deserializer Javadoc

I’ve implemented my own custom Deserializer and been using it with `KStream.reduceByKey`;
I observed that `reduceByKey` was passing null to my implementation, but it wasn’t clear
to me what my implementation was expected to do in this case. So this attempts to clarify
it.

This is my original work and I license this work to the Kafka project under Kafka’s open
source license (the Apache License 2.0).

Author: Avi Flax <avi@aviflax.com>

Reviewers: Eno Thereska <eno.thereska@gmail.com>, Ismael Juma <ismael@juma.me.uk>,
Guozhang Wang <wangguoz@gmail.com>, Ewen Cheslack-Postava <ewen@confluent.io>

Closes #1503 from aviflax/patch-1

(cherry picked from commit 6b1a6d9551fc44d80c7cffc0b4c21427da9d8fda)
Signed-off-by: Ewen Cheslack-Postava <me@ewencp.org>


Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/aebab7ca
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/aebab7ca
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/aebab7ca

Branch: refs/heads/trunk
Commit: aebab7cab6af88f777c1fb83604a1573554549a9
Parents: 932bb84
Author: Avi Flax <avi@aviflax.com>
Authored: Mon Jul 25 11:03:21 2016 -0700
Committer: Ewen Cheslack-Postava <me@ewencp.org>
Committed: Mon Jul 25 11:04:00 2016 -0700

----------------------------------------------------------------------
 .../org/apache/kafka/common/serialization/Deserializer.java  | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/aebab7ca/clients/src/main/java/org/apache/kafka/common/serialization/Deserializer.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/serialization/Deserializer.java
b/clients/src/main/java/org/apache/kafka/common/serialization/Deserializer.java
index 254b556..d6f4498 100644
--- a/clients/src/main/java/org/apache/kafka/common/serialization/Deserializer.java
+++ b/clients/src/main/java/org/apache/kafka/common/serialization/Deserializer.java
@@ -32,13 +32,13 @@ public interface Deserializer<T> extends Closeable {
     public void configure(Map<String, ?> configs, boolean isKey);
     
     /**
-     *
+     * Deserialize a record value from a bytearray into a value or object.
      * @param topic topic associated with the data
-     * @param data serialized bytes
-     * @return deserialized typed data
+     * @param data serialized bytes; may be null; implementations are recommended to handle
null by returning a value or null rather than throwing an exception.
+     * @return deserialized typed data; may be null
      */
     public T deserialize(String topic, byte[] data);
 
     @Override
     public void close();
-}
\ No newline at end of file
+}


Mime
View raw message