[REEF-2037] Make local file system deleteDirectory api recursive#1474
[REEF-2037] Make local file system deleteDirectory api recursive#1474motus merged 2 commits intoapache:masterfrom
Conversation
| Assert.False(File.Exists(childDirFileUri.AbsolutePath)); | ||
| Assert.False(File.Exists(fileUri.AbsolutePath)); | ||
| Assert.False(File.Exists(childDirUri.AbsolutePath)); | ||
| Assert.False(File.Exists(directoryUri.AbsolutePath)); |
There was a problem hiding this comment.
Asserting on the directory alone should suffice. #Closed
There was a problem hiding this comment.
| MakeRemoteTestFile(fs, fileUri); | ||
| var childDirFileUri = new Uri(directoryUri, $"{childDirName}/{fileName}"); | ||
| MakeRemoteTestFile(fs, childDirFileUri); | ||
| fs.DeleteDirectory(directoryUri); |
There was a problem hiding this comment.
This block of code is very dense. Please reorg to make more readable.
i.e.
//Create directory
//Create sub file
//Create sub directory #Closed
There was a problem hiding this comment.
|
@markusweimer, @motus, @tcondie -These changes look good to me, can one of you take a look? |
motus
left a comment
There was a problem hiding this comment.
Looks good! Will test and merge now
motus
left a comment
There was a problem hiding this comment.
Looks good! I've just noticed, though, that on Hadoop .DeleteDirectory() actually performs hdfs dfs -rmdir with no options -- that is, it will fail to delete non-empty directory. We probably want to make the directory removal behavior consistent across all file systems. Should we open a JIRA for it?
|
I created this - https://issues.apache.org/jira/browse/REEF-2038 |
[REEF-2037] Introduce configurable azure blob exponential retry policy
DeleteDirectory of LocalFileSystem does not do recursive delete unlike other filesystem implementations
JIRA:
REEF-2037
Pull request:
This closes 1474