Repository: hadoop
Updated Branches:
  refs/heads/branch-2 aa3d6d374 -> eea383ff2


HDFS-6779. Add missing version subcommand for hdfs. Contributed by Sasaki Toru.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/eea383ff
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/eea383ff
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/eea383ff

Branch: refs/heads/branch-2
Commit: eea383ff2e725c2c5807261be3ae57992cd3c3e8
Parents: aa3d6d3
Author: Haohui Mai <[email protected]>
Authored: Mon Sep 29 18:10:47 2014 -0700
Committer: Haohui Mai <[email protected]>
Committed: Mon Sep 29 18:20:44 2014 -0700

----------------------------------------------------------------------
 hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt                    | 3 +++
 hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs              | 5 ++++-
 .../hadoop-hdfs/src/site/apt/HDFSCommands.apt.vm               | 6 ++++++
 3 files changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/eea383ff/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt 
b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
index 2bb6ad8..5df88d3 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -267,6 +267,9 @@ Release 2.6.0 - UNRELEASED
 
     HDFS-7124. Remove EncryptionZoneManager.NULL_EZ. (clamb via wang)
 
+    HDFS-6779. Add missing version subcommand for hdfs.
+    (Sasaki Toru via wheat9)
+
   OPTIMIZATIONS
 
     HDFS-6690. Deduplicate xattr names in memory. (wang)

http://git-wip-us.apache.org/repos/asf/hadoop/blob/eea383ff/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs 
b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
index b5af54e..3d88fb1 100755
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
@@ -65,6 +65,7 @@ function print_usage(){
   echo "  cacheadmin           configure the HDFS cache"
   echo "  crypto               configure HDFS encryption zones"
   echo "  storagepolicies      get all the existing block storage policies"
+  echo "  version              print the version"
   echo ""
   echo "Most commands print help when invoked w/o parameters."
 }
@@ -112,7 +113,7 @@ if [ "$COMMAND" == "nfs3" ] && [ "$EUID" -eq 0 ] && [ -n 
"$HADOOP_PRIVILEGED_NFS
     if [ -n "$HADOOP_PRIVILEGED_NFS_PID_DIR" ]; then
       HADOOP_PID_DIR=$HADOOP_PRIVILEGED_NFS_PID_DIR
     fi
-  
+
     if [ -n "$HADOOP_PRIVILEGED_NFS_LOG_DIR" ]; then
       HADOOP_LOG_DIR=$HADOOP_PRIVILEGED_NFS_LOG_DIR
       HADOOP_OPTS="$HADOOP_OPTS -Dhadoop.log.dir=$HADOOP_LOG_DIR"
@@ -195,6 +196,8 @@ elif [ "$COMMAND" = "cacheadmin" ] ; then
   CLASS=org.apache.hadoop.hdfs.tools.CacheAdmin
 elif [ "$COMMAND" = "crypto" ] ; then
   CLASS=org.apache.hadoop.hdfs.tools.CryptoAdmin
+elif [ "$COMMAND" = "version" ] ; then
+  CLASS=org.apache.hadoop.util.VersionInfo
 else
   CLASS="$COMMAND"
 fi

http://git-wip-us.apache.org/repos/asf/hadoop/blob/eea383ff/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HDFSCommands.apt.vm
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HDFSCommands.apt.vm 
b/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HDFSCommands.apt.vm
index 1e73377..7085110 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HDFSCommands.apt.vm
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/site/apt/HDFSCommands.apt.vm
@@ -114,6 +114,12 @@ HDFS Commands Guide
 |   -racks               | Print out network topology for data-node locations.
 *------------------------+---------------------------------------------+
 
+** <<<version>>>
+
+   Prints the version.
+
+   Usage: <<<hdfs version>>>
+
 * Administration Commands
 
    Commands useful for administrators of a hadoop cluster.

Reply via email to