HDFS-14241. Provide feedback on successful renameSnapshot and deleteSnapshot. Contrib...
authorSiyao Meng <smeng@cloudera.com>
Thu, 14 Feb 2019 03:48:02 +0000 (19:48 -0800)
committerWei-Chiu Chuang <weichiu@apache.org>
Thu, 14 Feb 2019 03:48:02 +0000 (19:48 -0800)
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/SnapshotCommands.java

index 440d480..4bd596a 100644 (file)
@@ -125,6 +125,7 @@ class SnapshotCommands extends FsCommand {
       assert (items.size() == 1);
       PathData sroot = items.getFirst();
       sroot.fs.deleteSnapshot(sroot.path, snapshotName);
+      out.println("Deleted snapshot " + snapshotName + " under " + sroot.path);
     }
   }
   
@@ -166,6 +167,8 @@ class SnapshotCommands extends FsCommand {
       Preconditions.checkArgument(items.size() == 1);
       PathData sroot = items.getFirst();
       sroot.fs.renameSnapshot(sroot.path, oldName, newName);
+      out.println("Renamed snapshot " + oldName + " to " + newName +
+          " under " + sroot.path);
     }
     
   }