You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/09/13 22:08:33 UTC

[GitHub] [hudi] yihua commented on a diff in pull request #6270: [HUDI-4837] Stop sleeping where it is not necessary after the success

yihua commented on code in PR #6270:
URL: https://github.com/apache/hudi/pull/6270#discussion_r970120964


##########
hudi-utilities/src/main/java/org/apache/hudi/utilities/sources/helpers/KafkaOffsetGen.java:
##########
@@ -311,7 +311,9 @@ private List<PartitionInfo> fetchPartitionInfos(KafkaConsumer consumer, String t
     do {
       partitionInfos = consumer.partitionsFor(topicName);
       try {
-        TimeUnit.SECONDS.sleep(10);
+        if (partitionInfos == null) {
+          TimeUnit.SECONDS.sleep(10);

Review Comment:
   I created a Jira ticket for this improvement as a follow-up: HUDI-4838.  Let's land this PR as is.



-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org