You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by st...@apache.org on 2014/10/10 21:00:57 UTC

[18/50] [abbrv] git commit: HDFS-6779. Add missing version subcommand for hdfs. Contributed by Sasaki Toru.

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/a0fdda81
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a0fdda81
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a0fdda81

Branch: refs/heads/champlain
Commit: a0fdda816d46f1f66547cb1858d14a58cfe5392a
Parents: 4ceea84
Author: Haohui Mai <wh...@apache.org>
Authored: Mon Sep 29 18:10:47 2014 -0700
Committer: Jitendra Pandey <Ji...@Jitendra-Pandeys-MacBook-Pro-4.local>
Committed: Wed Oct 8 23:25:40 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/a0fdda81/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 e702277..e719821 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
+++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt
@@ -291,6 +291,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/a0fdda81/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 9c1a8d1..6184c01 100755
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
@@ -70,6 +70,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."
 }
@@ -117,7 +118,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"
@@ -200,6 +201,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/a0fdda81/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.