WencongLiu commented on code in PR #22341:
URL: https://github.com/apache/flink/pull/22341#discussion_r1264361955


##########
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/FileSystemJobResultStore.java:
##########
@@ -181,37 +188,70 @@ public void markResultAsCleanInternal(JobID jobId) throws 
IOException, NoSuchEle
     }
 
     @Override
-    public boolean hasDirtyJobResultEntryInternal(JobID jobId) throws 
IOException {
-        return fileSystem.exists(constructDirtyPath(jobId));
+    public CompletableFuture<Boolean> hasDirtyJobResultEntryInternal(JobID 
jobId) {
+        CompletableFuture<Boolean> hasDirtyJobResultEntryFuture = new 
CompletableFuture<>();
+        ioExecutor.execute(
+                () -> {
+                    try {
+                        hasDirtyJobResultEntryFuture.complete(
+                                fileSystem.exists(constructDirtyPath(jobId)));
+                    } catch (IOException e) {
+                        hasDirtyJobResultEntryFuture.completeExceptionally(e);
+                    }
+                });
+        return hasDirtyJobResultEntryFuture;
     }
 
     @Override
-    public boolean hasCleanJobResultEntryInternal(JobID jobId) throws 
IOException {
-        return fileSystem.exists(constructCleanPath(jobId));
+    public CompletableFuture<Boolean> hasCleanJobResultEntryInternal(JobID 
jobId) {
+        CompletableFuture<Boolean> hasCleanJobResultEntryFuture = new 
CompletableFuture<>();

Review Comment:
   Fixed.



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