zhangshenghang commented on code in PR #8354:
URL: https://github.com/apache/seatunnel/pull/8354#discussion_r1893942892


##########
seatunnel-translation/seatunnel-translation-flink/seatunnel-translation-flink-common/src/main/java/org/apache/seatunnel/translation/flink/source/FlinkSourceReader.java:
##########
@@ -55,6 +58,18 @@ public class FlinkSourceReader<SplitT extends SourceSplit>
 
     private InputStatus inputStatus = InputStatus.MORE_AVAILABLE;
 
+    private volatile CompletableFuture<Void> availabilityFuture;
+
+    private static final long DEFAULT_WAIT_TIME_MILLIS = 1000L;
+
+    private final ScheduledExecutorService scheduledExecutor =
+            Executors.newSingleThreadScheduledExecutor(
+                    r -> {
+                        Thread thread = new Thread(r, 
"source-reader-scheduler");
+                        thread.setDaemon(true);
+                        return thread;
+                    });

Review Comment:
   When there is no data, we should return InputStatus.NOTHIND_AVAILABLE When 
returning the NOTHIND_AVAILABLE state, the isAvailable() method will be 
executed. IsAvailable returns a future, where the longer the blocking time, the 
lower the Busy value.



-- 
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