> On March 12, 2015, 1:22 a.m., Guozhang Wang wrote: > > Hit this unit test failure, is this relevant? > > > > ---------------------- > > > > kafka.consumer.ZookeeperConsumerConnectorTest > > > testConsumerRebalanceListener FAILED > > junit.framework.AssertionFailedError: > > expected:<List((0,group1_consumer1-0), (1,group1_consumer2-0))> but > > was:<ArrayBuffer((1,group1_consumer2-0))> > > at junit.framework.Assert.fail(Assert.java:47) > > at junit.framework.Assert.failNotEquals(Assert.java:277) > > at junit.framework.Assert.assertEquals(Assert.java:64) > > at junit.framework.Assert.assertEquals(Assert.java:71) > > at > > kafka.consumer.ZookeeperConsumerConnectorTest.testConsumerRebalanceListener(ZookeeperConsumerConnectorTest.scala:393)
It is a bug but irrelavant to this patch I believe. The reason is that consumer 2 finishes rebalance before consumer 1 does, so zookeeper did not have the complete ownership info yet when we do the assertion. I fixed this by consuming one message from consumer 1 before checking ownership info from zookeeper. - Jiangjie ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31706/#review76189 ----------------------------------------------------------- On March 11, 2015, 10:20 p.m., Jiangjie Qin wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31706/ > ----------------------------------------------------------- > > (Updated March 11, 2015, 10:20 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1997 > https://issues.apache.org/jira/browse/KAFKA-1997 > > > Repository: kafka > > > Description > ------- > > Addressed Guozhang's comments. > > > Changed the exit behavior on send failure because close(0) is not ready yet. > Will submit followup patch after KAFKA-1660 is checked in. > > > Expanded imports from _ and * to full class path > > > Incorporated Joel's comments. > > > Addressed Joel's comments. > > > Addressed Guozhang's comments. > > > Incorporated Guozhang's comments. > > > Diffs > ----- > > > clients/src/main/java/org/apache/kafka/clients/producer/internals/RecordAccumulator.java > d5c79e2481d5e9a2524ac2ef6a6879f61cb7cb5f > core/src/main/scala/kafka/consumer/PartitionAssignor.scala > e6ff7683a0df4a7d221e949767e57c34703d5aad > core/src/main/scala/kafka/consumer/ZookeeperConsumerConnector.scala > 5487259751ebe19f137948249aa1fd2637d2deb4 > core/src/main/scala/kafka/javaapi/consumer/ConsumerRebalanceListener.java > 7f45a90ba6676290172b7da54c15ee5dc1a42a2e > core/src/main/scala/kafka/tools/MirrorMaker.scala > bafa379ff57bc46458ea8409406f5046dc9c973e > core/src/test/scala/unit/kafka/consumer/PartitionAssignorTest.scala > 543070f4fd3e96f3183cae9ee2ccbe843409ee58 > > core/src/test/scala/unit/kafka/consumer/ZookeeperConsumerConnectorTest.scala > 19640cc55b5baa0a26a808d708b7f4caf491c9f0 > > Diff: https://reviews.apache.org/r/31706/diff/ > > > Testing > ------- > > > Thanks, > > Jiangjie Qin > >