You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/03/17 08:33:32 UTC
[GitHub] [ozone] cchenax opened a new pull request #2054: Deleting at bucket root throws NPE
cchenax opened a new pull request #2054:
URL: https://github.com/apache/ozone/pull/2054
## What changes were proposed in this pull request?
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-4838
## How was this patch tested?
hdfs hdfs dfs -rm -r -skipTrash o3fs://bucket1.vol1/
WARN ozone.BasicOzoneFileSystem: Cannot delete root directory.
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] ayushtkn commented on a change in pull request #2054: Deleting at bucket root throws NPE
Posted by GitBox <gi...@apache.org>.
ayushtkn commented on a change in pull request #2054:
URL: https://github.com/apache/ozone/pull/2054#discussion_r595960251
##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
##########
@@ -496,6 +496,11 @@ public boolean delete(Path f, boolean recursive) throws IOException {
String key = pathToKey(f);
boolean result;
+ if (f.isRoot()) {
Review comment:
There is a similar check below inside `innerDelete`-
```
try {
DeleteIterator iterator = new DeleteIterator(f, recursive);
if (f.isRoot()) {
LOG.warn("Cannot delete root directory.");
return false;
}
```
Does that not work? Or will that be redundant post this?
In any case this should be inside ` if (status.isDirectory()) {` block
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] cchenax closed pull request #2054: Deleting at bucket root throws NPE
Posted by GitBox <gi...@apache.org>.
cchenax closed pull request #2054:
URL: https://github.com/apache/ozone/pull/2054
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] cchenax commented on a change in pull request #2054: Deleting at bucket root throws NPE
Posted by GitBox <gi...@apache.org>.
cchenax commented on a change in pull request #2054:
URL: https://github.com/apache/ozone/pull/2054#discussion_r598391849
##########
File path: hadoop-ozone/ozonefs-common/src/main/java/org/apache/hadoop/fs/ozone/BasicOzoneFileSystem.java
##########
@@ -496,6 +496,11 @@ public boolean delete(Path f, boolean recursive) throws IOException {
String key = pathToKey(f);
boolean result;
+ if (f.isRoot()) {
Review comment:
Ok,I will add the unit test
--
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org