steveloughran commented on a change in pull request #1106: HADOOP-16380. S3A
non-recursive deletion of root to return false
URL: https://github.com/apache/hadoop/pull/1106#discussion_r304946676
##########
File path:
hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java
##########
@@ -2195,6 +2195,10 @@ void removeKeys(
public boolean delete(Path f, boolean recursive) throws IOException {
try {
entryPoint(INVOCATION_DELETE);
+ if (f.isRoot()) {
Review comment:
you're going to have to qualify the path. this is done in getFilestatus() in
the main delete codepath, but now you'll have to do it first (you can reuse
that path in L2199 and L2202, obviously)
Thinking about this, all we need is your change to
`rejectRootDirectoryDelete()`, without needing any other changes to the
delete/innerDelete codepath. Yes, we'll do a needless getFileStatus and return
the wrong empty flag if there's a tombstone, but that "feature" is still there
no matter what. And I don't care about performance here given the operation
will always be rejected
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]