HADOOP-15370. S3A log message on rm s3a://bucket/ not intuitive. Contributed by Gabor Bota.
Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/5d96b74f Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/5d96b74f Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/5d96b74f Branch: refs/heads/trunk Commit: 5d96b74f33ca716c9fe4fadb046f79ed488a3059 Parents: 3ce99e3 Author: Sean Mackrory <mackror...@apache.org> Authored: Mon Nov 26 08:54:39 2018 -0700 Committer: Sean Mackrory <mackror...@apache.org> Committed: Wed Nov 28 10:45:09 2018 -0700 ---------------------------------------------------------------------- .../main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/5d96b74f/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java ---------------------------------------------------------------------- diff --git a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java index df7bd77..e6eab8a 100644 --- a/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java +++ b/hadoop-tools/hadoop-aws/src/main/java/org/apache/hadoop/fs/s3a/S3AFileSystem.java @@ -1826,16 +1826,20 @@ public class S3AFileSystem extends FileSystem implements StreamCapabilities { */ private boolean rejectRootDirectoryDelete(S3AFileStatus status, boolean recursive) throws IOException { - LOG.info("s3a delete the {} root directory of {}", bucket, recursive); + LOG.info("s3a delete the {} root directory. Path: {}. Recursive: {}", + bucket, status.getPath(), recursive); boolean emptyRoot = status.isEmptyDirectory() == Tristate.TRUE; if (emptyRoot) { return true; } if (recursive) { + LOG.error("Cannot delete root path: {}", status.getPath()); return false; } else { // reject - throw new PathIOException(bucket, "Cannot delete root path"); + String msg = "Cannot delete root path: " + status.getPath(); + LOG.error(msg); + throw new PathIOException(bucket, msg); } } --------------------------------------------------------------------- To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: common-commits-h...@hadoop.apache.org