Github user tillrohrmann commented on the issue:

    https://github.com/apache/flink/pull/2970
  
    I've update this PR @StephanEwen. Unfortunately, I couldn't use Hadoop's 
`FileSystem#getContentSummary` because it will first request the status for the 
given path, then list all files and directories if the path is a directory. For 
each file it will aggregate the `FileStatus` and then recursively descend into 
each directory. Thus, I think that this method is not faster.
    
    I've refactored the code to contain a method `FileUtils#deletePathIfEmpty` 
to delete the path if it does not contain any files/directories.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to