fengli commented on a change in pull request #7726: [FLINK-10342] Filter 
restored partitions with discovered partitions b…
URL: https://github.com/apache/flink/pull/7726#discussion_r260327536
 
 

 ##########
 File path: 
flink-connectors/flink-connector-kafka-base/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaConsumerBase.java
 ##########
 @@ -515,15 +510,17 @@ public void open(Configuration configuration) throws 
Exception {
                        }
 
                        if (filterRestoredPartitionsWithDiscovered) {
-                               
subscribedPartitionsToStartOffsets.entrySet().removeIf(
-                                       entry -> {
-                                               if 
(!allPartitions.contains(entry.getKey())) {
-                                                       LOG.warn("{} is removed 
from subscribed Partitions.", entry.getKey());
-                                                       return true;
-                                               }
-                                               return false;
+                               Iterator<Map.Entry<KafkaTopicPartition, Long>> 
iter = subscribedPartitionsToStartOffsets.entrySet().iterator();
 
 Review comment:
   Just another (unrelevant) question: is there some way to verify the code 
faster ? I'll have to do `mvn clean verify` locally and it takes a lot of time. 
   
   What is your general workflow of doing this? Thanks :) 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to