zentol commented on a change in pull request #18692:
URL: https://github.com/apache/flink/pull/18692#discussion_r805896473



##########
File path: 
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/FileSystemJobResultStore.java
##########
@@ -155,18 +166,15 @@ public boolean hasCleanJobResultEntryInternal(JobID 
jobId) throws IOException {
     @Override
     public Set<JobResult> getDirtyResultsInternal() throws IOException {
         final Set<JobResult> dirtyResults = new HashSet<>();
-        final FileStatus fs = fileSystem.getFileStatus(this.basePath);
-        if (fs.isDir()) {
-            FileStatus[] statuses = fileSystem.listStatus(this.basePath);
-            for (FileStatus s : statuses) {
-                if (!s.isDir()) {
-                    String fileName = s.getPath().getName();
-                    if (fileName.contains(DIRTY_SUFFIX)) {
-                        JsonJobResultEntry jre =
-                                mapper.readValue(
-                                        fileSystem.open(s.getPath()), 
JsonJobResultEntry.class);
-                        dirtyResults.add(jre.getJobResult());
-                    }
+        final FileStatus[] statuses = fileSystem.listStatus(this.basePath);
+        for (FileStatus s : statuses) {
+            if (!s.isDir()) {
+                final String fileName = s.getPath().getName();
+                if (fileName.endsWith(DIRTY_FILE_EXTENSION)) {

Review comment:
       use hasValidDirtyJobResultStoreEntryExtension()




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