----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/32869/#review80738 -----------------------------------------------------------
clients/src/main/java/org/apache/kafka/clients/producer/Partitioner.java <https://reviews.apache.org/r/32869/#comment130858> It is reasonable to need to partition on the key prior to serialization. I wonder if people would also want access to the value? This is a bit odd, but could potentially be useful... What about making this public int partition(String topic, Object key, byte[] keyBytes, Object value, byte[] valBytes, Integer partition, Cluster cluster); Should DefaultPartitioner move into the public package since now users can directly configure it? Also if this is a public interface it would be good to add a producer test that configures a custom partitioner and checks that it takes effect so that this keeps working. - Jay Kreps On April 6, 2015, 12:13 a.m., Sriharsha Chintalapani wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/32869/ > ----------------------------------------------------------- > > (Updated April 6, 2015, 12:13 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-2091 > https://issues.apache.org/jira/browse/KAFKA-2091 > > > Repository: kafka > > > Description > ------- > > KAFKA-2091. Expose a Partitioner interface in the new producer. > > > Diffs > ----- > > clients/src/main/java/org/apache/kafka/clients/producer/KafkaProducer.java > ab263423ff1d33170effb71acdef3fc501fa072a > clients/src/main/java/org/apache/kafka/clients/producer/MockProducer.java > 6913090af03a455452b0b5c3df78f266126b3854 > clients/src/main/java/org/apache/kafka/clients/producer/Partitioner.java > PRE-CREATION > clients/src/main/java/org/apache/kafka/clients/producer/ProducerConfig.java > fa9daaef66ff7961e1c46cd0cd8fed18a53bccd8 > > clients/src/main/java/org/apache/kafka/clients/producer/internals/Partitioner.java > 93e799105fb6cc5c49a129c0db099a3a973b2ab3 > > clients/src/test/java/org/apache/kafka/clients/producer/internals/PartitionerTest.java > 5dadd0e3554577ad6be28a18ff5ab08f8b31050f > > Diff: https://reviews.apache.org/r/32869/diff/ > > > Testing > ------- > > > Thanks, > > Sriharsha Chintalapani > >