From 77f7bfa9ef099297a741b7c949cd282cfdaf601c Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Mon, 18 Mar 2013 11:36:59 +0000 Subject: [PATCH] HDFS-4556. Add snapshotdiff and LsSnapshottableDir tools to hdfs script. Contributed by Arpit Agarwal git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/HDFS-2802@1457712 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-2802.txt | 3 +++ hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-2802.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-2802.txt index 6adae3d16d..7768529d00 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-2802.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.HDFS-2802.txt @@ -198,3 +198,6 @@ Branch-2802 Snapshot (Unreleased) HDFS-4144. Create test for all snapshot-related metrics. (Jing Zhao via suresh) + + HDFS-4556. Add snapshotdiff and LsSnapshottableDir tools to hdfs script. + (Arpit Agarwal via szetszwo) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs index 709520f4a7..c88b2a0cd2 100755 --- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs +++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs @@ -53,6 +53,9 @@ function print_usage(){ echo " fetchdt fetch a delegation token from the NameNode" echo " getconf get config values from configuration" echo " groups get the groups which users belong to" + echo " snapshotDiff diff two snapshots of a directory or diff the" + echo " current directory contents with a snapshot" + echo " lsSnapshottableDir list all snapshottable dirs owned by the current user" echo " Use -help to see options" echo "" echo "Most commands print help when invoked w/o parameters." @@ -142,6 +145,10 @@ elif [ "$COMMAND" = "getconf" ] ; then CLASS=org.apache.hadoop.hdfs.tools.GetConf elif [ "$COMMAND" = "groups" ] ; then CLASS=org.apache.hadoop.hdfs.tools.GetGroups +elif [ "$COMMAND" = "snapshotDiff" ] ; then + CLASS=org.apache.hadoop.hdfs.tools.snapshot.SnapshotDiff +elif [ "$COMMAND" = "lsSnapshottableDir" ] ; then + CLASS=org.apache.hadoop.hdfs.tools.snapshot.LsSnapshottableDir else CLASS="$COMMAND" fi