XComp commented on a change in pull request #18692:
URL: https://github.com/apache/flink/pull/18692#discussion_r806857666
##########
File path:
flink-runtime/src/main/java/org/apache/flink/runtime/highavailability/FileSystemJobResultStore.java
##########
@@ -155,18 +155,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);
Review comment:
To clarify: I looked through the code once more. The
`PrestoS3FileSystem` does not support `getFileStatus` on empty directories.
You're right when you said that the `mkdir` call doesn't create anything (see
[PrestoS3FileSystem:520](https://github.com/prestodb/presto/blob/master/presto-hive/src/main/java/com/facebook/presto/hive/s3/PrestoS3FileSystem.java#L520)).
But the `getFileStatus` method tries to get the `FileStatus` of the object at
the given path. If that does not exist, it will look for objects having the
path as a prefix (through `listObject`). A `FileNotFoundException` is thrown if
no objects live underneath the passed path (which corresponds to an empty
directory, see
[PrestoS3FileSystem:361](https://github.com/prestodb/presto/blob/master/presto-hive/src/main/java/com/facebook/presto/hive/s3/PrestoS3FileSystem.java#L361)).
--
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]