Hisoka-X commented on code in PR #8314:
URL: https://github.com/apache/seatunnel/pull/8314#discussion_r1897344368


##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -307,10 +307,13 @@ private Set<KafkaSourceSplit> getTopicInfo() throws 
ExecutionException, Interrup
         }
         log.info("Discovered topics: {}", topics);
         Collection<TopicPartition> partitions =
-                
adminClient.describeTopics(topics).all().get().values().stream()
+                
adminClient.describeTopics(topics).allTopicNames().get().values().stream()
                         .flatMap(
                                 t ->
                                         t.partitions().stream()
+                                                .filter(
+                                                        partitionInfo ->
+                                                                
partitionInfo.leader() != null)

Review Comment:
   > Can we provide users with a parameter similar to ignoreNoLeaderPartition, 
which defaults to false, allowing users to choose?
   
   Ok for me.



##########
seatunnel-connectors-v2/connector-kafka/src/main/java/org/apache/seatunnel/connectors/seatunnel/kafka/source/KafkaSourceSplitEnumerator.java:
##########
@@ -307,10 +307,13 @@ private Set<KafkaSourceSplit> getTopicInfo() throws 
ExecutionException, Interrup
         }
         log.info("Discovered topics: {}", topics);
         Collection<TopicPartition> partitions =
-                
adminClient.describeTopics(topics).all().get().values().stream()
+                
adminClient.describeTopics(topics).allTopicNames().get().values().stream()
                         .flatMap(
                                 t ->
                                         t.partitions().stream()
+                                                .filter(
+                                                        partitionInfo ->
+                                                                
partitionInfo.leader() != null)

Review Comment:
   > Can we provide users with a parameter similar to ignoreNoLeaderPartition, 
which defaults to false, allowing users to choose?
   
   Ok for me. cc @hailin0 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to