Github user aniketalhat commented on a diff in the pull request:

    https://github.com/apache/storm/pull/2755#discussion_r200866147
  
    --- Diff: 
external/storm-kafka-client/src/main/java/org/apache/storm/kafka/spout/NamedTopicFilter.java
 ---
    @@ -54,8 +57,12 @@ public NamedTopicFilter(String... topics) {
         public List<TopicPartition> 
getFilteredTopicPartitions(KafkaConsumer<?, ?> consumer) {
             List<TopicPartition> allPartitions = new ArrayList<>();
             for (String topic : topics) {
    -            for (PartitionInfo partitionInfo: 
consumer.partitionsFor(topic)) {
    -                allPartitions.add(new 
TopicPartition(partitionInfo.topic(), partitionInfo.partition()));
    +            if(consumer.partitionsFor(topic) != null) {
    --- End diff --
    
    @srdo I thought JIT will inline it but sure 


---

Reply via email to