You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by Jun Rao <ju...@gmail.com> on 2015/04/08 00:41:00 UTC
Re: Review Request 31369: Patch for KAFKA-1982
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31369/#review77523
-----------------------------------------------------------
Sorry for the late review. A few more comments below.
clients/src/main/java/org/apache/kafka/common/serialization/IntegerDeserializer.java
<https://reviews.apache.org/r/31369/#comment125614>
We probably should throw a SerializationException if the size of the data is not 4.
clients/src/main/java/org/apache/kafka/common/serialization/IntegerSerializer.java
<https://reviews.apache.org/r/31369/#comment128503>
ByteBuffer.array() returns the backing array. The actual content may not start at offset 0.
Could we do sth like the following and do the reverse of that in deserialization?
return new byte[] {
(byte)(value >>> 24),
(byte)(value >>> 16),
(byte)(value >>> 8),
(byte)value};
clients/src/test/java/org/apache/kafka/common/serialization/SerializationTest.java
<https://reviews.apache.org/r/31369/#comment128504>
Perhaps we can test a negative value too?
examples/src/main/java/kafka/examples/Producer.java
<https://reviews.apache.org/r/31369/#comment125615>
Could we make the output here consistent with line 62? Probably use the format "record(key, value)"?
- Jun Rao
On March 4, 2015, 1:51 a.m., Ashish Singh wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31369/
> -----------------------------------------------------------
>
> (Updated March 4, 2015, 1:51 a.m.)
>
>
> Review request for kafka.
>
>
> Bugs: KAFKA-1982
> https://issues.apache.org/jira/browse/KAFKA-1982
>
>
> Repository: kafka
>
>
> Description
> -------
>
> KAFKA-1982: change kafka.examples.Producer to use the new java producer
>
>
> Diffs
> -----
>
> clients/src/main/java/org/apache/kafka/common/serialization/IntegerDeserializer.java PRE-CREATION
> clients/src/main/java/org/apache/kafka/common/serialization/IntegerSerializer.java PRE-CREATION
> clients/src/test/java/org/apache/kafka/common/serialization/SerializationTest.java f5cd61c1aa9433524da0b83826a766389de68a0b
> examples/README 53db6969b2e2d49e23ab13283b9146848e37434e
> examples/src/main/java/kafka/examples/Consumer.java 13135b954f3078eeb7394822b0db25470b746f03
> examples/src/main/java/kafka/examples/KafkaConsumerProducerDemo.java 1239394190fe557e025fbd8f3803334402b0aeea
> examples/src/main/java/kafka/examples/Producer.java 96e98933148d07564c1b30ba8e805e2433c2adc8
> examples/src/main/java/kafka/examples/SimpleConsumerDemo.java 0d66fe5f8819194c8624aed4a21105733c20cc8e
>
> Diff: https://reviews.apache.org/r/31369/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Ashish Singh
>
>
Re: Review Request 31369: Patch for KAFKA-1982
Posted by Ashish Singh <as...@cloudera.com>.
> On April 7, 2015, 10:41 p.m., Jun Rao wrote:
> > Sorry for the late review. A few more comments below.
Done!
- Ashish
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/31369/#review77523
-----------------------------------------------------------
On April 17, 2015, 10:09 p.m., Ashish Singh wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/31369/
> -----------------------------------------------------------
>
> (Updated April 17, 2015, 10:09 p.m.)
>
>
> Review request for kafka.
>
>
> Bugs: KAFKA-1982
> https://issues.apache.org/jira/browse/KAFKA-1982
>
>
> Repository: kafka
>
>
> Description
> -------
>
> KAFKA-1982: change kafka.examples.Producer to use the new java producer
>
>
> Diffs
> -----
>
> clients/src/main/java/org/apache/kafka/common/serialization/IntegerDeserializer.java PRE-CREATION
> clients/src/main/java/org/apache/kafka/common/serialization/IntegerSerializer.java PRE-CREATION
> clients/src/test/java/org/apache/kafka/common/serialization/SerializationTest.java f5cd61c1aa9433524da0b83826a766389de68a0b
> examples/README 53db6969b2e2d49e23ab13283b9146848e37434e
> examples/src/main/java/kafka/examples/Consumer.java 13135b954f3078eeb7394822b0db25470b746f03
> examples/src/main/java/kafka/examples/KafkaConsumerProducerDemo.java 1239394190fe557e025fbd8f3803334402b0aeea
> examples/src/main/java/kafka/examples/Producer.java 96e98933148d07564c1b30ba8e805e2433c2adc8
> examples/src/main/java/kafka/examples/SimpleConsumerDemo.java 0d66fe5f8819194c8624aed4a21105733c20cc8e
>
> Diff: https://reviews.apache.org/r/31369/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Ashish Singh
>
>