----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/36590/#review92222 -----------------------------------------------------------
clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java (line 1069) <https://reviews.apache.org/r/36590/#comment146249> That is a good point and is actually true. The reason the test I added worked fine is because it never added any topic to metadata, so it sent a TopicMetadataRequest with no topics, in which case metadata for all topics is sent back by broker. However, if I add some topics to metadata by calling {{var mapTopicParts = this.consumers(0).partitionsFor(topic1, topic2)}} before calling {{var mapTopicParts = this.consumers(0).partitionsFor()}} the test fails. Will add the test and address the issues. Thanks! - Ashish Singh On July 18, 2015, 4:39 a.m., Ashish Singh wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/36590/ > ----------------------------------------------------------- > > (Updated July 18, 2015, 4:39 a.m.) > > > Review request for kafka. > > > Bugs: KAFKA-2275 > https://issues.apache.org/jira/browse/KAFKA-2275 > > > Repository: kafka > > > Description > ------- > > Return metadata for all topics if empty list is passed to partitionsFor > > > KAFKA-2275: Add a "Map<String, List<PartitionInfo>> partitionsFor(String... > topics)" API to the new consumer > > > Diffs > ----- > > clients/src/main/java/org/apache/kafka/clients/consumer/Consumer.java > 252b759c0801f392e3526b0f31503b4b8fbf1c8a > clients/src/main/java/org/apache/kafka/clients/consumer/KafkaConsumer.java > bea3d737c51be77d5b5293cdd944d33b905422ba > clients/src/main/java/org/apache/kafka/clients/consumer/MockConsumer.java > c14eed1e95f2e682a235159a366046f00d1d90d6 > core/src/test/scala/integration/kafka/api/ConsumerTest.scala > 3eb5f95731a3f06f662b334ab2b3d0ad7fa9e1ca > > Diff: https://reviews.apache.org/r/36590/diff/ > > > Testing > ------- > > > Thanks, > > Ashish Singh > >