HDFS-14241. Provide feedback on successful renameSnapshot and deleteSnapshot. Contributed by Siyao Meng.
Signed-off-by: Wei-Chiu Chuang <weichiu@apache.org>
This commit is contained in:
parent
fa067aa157
commit
fd026863b1
@ -125,6 +125,7 @@ protected void processArguments(LinkedList<PathData> items)
|
||||
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 @@ protected void processArguments(LinkedList<PathData> items)
|
||||
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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user