----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31566/#review74893 -----------------------------------------------------------
Thanks for the patch. A couple of minor comments below. clients/src/main/java/org/apache/kafka/clients/producer/internals/Partitioner.java <https://reviews.apache.org/r/31566/#comment121720> Perhaps we can change the comment to the following. A cheap way to deterministically convert a number to a positive value. When the input number is negative, the returned positive value is not the absolute value of the input though. clients/src/main/java/org/apache/kafka/clients/producer/internals/Partitioner.java <https://reviews.apache.org/r/31566/#comment121721> We can just say it returns a positive number. - Jun Rao On Feb. 27, 2015, 11:16 p.m., Tong Li wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31566/ > ----------------------------------------------------------- > > (Updated Feb. 27, 2015, 11:16 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1988 > https://issues.apache.org/jira/browse/KAFKA-1988 > > > Repository: kafka > > > Description > ------- > > KAFKA-1988 org.apache.kafka.common.utils.Utils.abs method returns wrong value > for negative numbers > > > Diffs > ----- > > > clients/src/main/java/org/apache/kafka/clients/producer/internals/Partitioner.java > dfb936d8f0d5842ee5c7a7f1584c5ed7463c4cf8 > clients/src/main/java/org/apache/kafka/common/utils/Utils.java > 69530c187cd1c41b8173b61de6f982aafe65c9fe > clients/src/test/java/org/apache/kafka/common/utils/UtilsTest.java > 4c2ea34815b63174732d58b699e1a0a9e6ec3b6f > > Diff: https://reviews.apache.org/r/31566/diff/ > > > Testing > ------- > > > Thanks, > > Tong Li > >