XComp commented on pull request #18692:
URL: https://github.com/apache/flink/pull/18692#issuecomment-1040317952


   > Did you step through PrestoS3FileSystem to see which call fails? How does 
the test (FileSystemBehaviorTestSuite.testMkdirsCreatesParentDirectories) 
actually fail? Is the assertion failing, or is the FS throwing a 
FileNotFoundException.
   > I'm asking because FileSystem#exists only checks whether getFileStatus 
returns null, but I don't see a codepath in the presto filesystem where that 
can be the case.
   
   I guess, I see where the confusion is coming: I missed the fact that the 
`FileNotFoundException` is handled in the `hadoop-common` FileSystem 
implementation (see 
[FileSystem:1401](https://github.com/apache/hadoop-common/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/FileSystem.java#L1401)).
 Hence, `exists()` doesn't cause problems but the `getFileStatus` 
implementation which is used in the pre-PR implementation of 
`FileSystemJobResultStore` (see my [comment 
above](https://github.com/apache/flink/pull/18692#discussion_r806857666) for 
the code path).
   
   Hence, change in question (removing the directory check) is still necessary 
for `PrestoS3FileSystem`. Otherwise, we would run into `FileNotFoundException`s 
when the base directory is empty.


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