HADOOP-12866. add a subcommand for gridmix (Kai Sasaki via aw)

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

Branch: refs/heads/HDFS-1312
Commit: 1c5bbf64993ff9c6b5bfe1566b794b5ae45bc636
Parents: 2835f14
Author: Allen Wittenauer <[email protected]>
Authored: Fri May 6 14:07:02 2016 -0700
Committer: Allen Wittenauer <[email protected]>
Committed: Fri May 6 14:07:02 2016 -0700

----------------------------------------------------------------------
 .../hadoop-common/src/main/bin/hadoop             |  6 ++++++
 .../src/site/markdown/CommandsManual.md           |  4 ++++
 .../src/site/markdown/GridMix.md.vm               | 18 +++---------------
 3 files changed, 13 insertions(+), 15 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1c5bbf64/hadoop-common-project/hadoop-common/src/main/bin/hadoop
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop 
b/hadoop-common-project/hadoop-common/src/main/bin/hadoop
index 23fa9c7..fccb9f8 100755
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop
@@ -36,6 +36,7 @@ function hadoop_usage
   hadoop_add_subcommand "dtutil" "operations related to delegation tokens"
   hadoop_add_subcommand "envvars" "display computed Hadoop environment 
variables"
   hadoop_add_subcommand "fs" "run a generic filesystem user client"
+  hadoop_add_subcommand "gridmix" "submit a mix of synthetic job, modeling a 
profiled from production load"
   hadoop_add_subcommand "jar <jar>" "run a jar file. NOTE: please use \"yarn 
jar\" to launch YARN applications, not this command."
   hadoop_add_subcommand "jnipath" "prints the java.library.path"
   hadoop_add_subcommand "kerbname" "show auth_to_local principal conversion"
@@ -158,6 +159,11 @@ case ${COMMAND} in
   fs)
     CLASS=org.apache.hadoop.fs.FsShell
   ;;
+  gridmix)
+    CLASS=org.apache.hadoop.mapred.gridmix.Gridmix
+    hadoop_add_to_classpath_tools hadoop-rumen
+    hadoop_add_to_classpath_tools hadoop-gridmix
+  ;;
   jar)
     if [[ -n "${YARN_OPTS}" ]] || [[ -n "${YARN_CLIENT_OPTS}" ]]; then
       hadoop_error "WARNING: Use \"yarn jar\" to launch YARN applications."

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1c5bbf64/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md
----------------------------------------------------------------------
diff --git 
a/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md 
b/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md
index 5d6983b..fe3e7c1 100644
--- a/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md
+++ b/hadoop-common-project/hadoop-common/src/site/markdown/CommandsManual.md
@@ -157,6 +157,10 @@ For every subcommand that connects to a service, 
convenience flags are provided
 
 This command is documented in the [File System Shell 
Guide](./FileSystemShell.html). It is a synonym for `hdfs dfs` when HDFS is in 
use.
 
+### `gridmix`
+
+Gridmix is a benchmark tool for Hadoop cluster. More information can be found 
in the [Gridmix Guide](../../hadoop-gridmix/GridMix.html).
+
 ### `jar`
 
 Usage: `hadoop jar <jar> [mainClass] args...`

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1c5bbf64/hadoop-tools/hadoop-gridmix/src/site/markdown/GridMix.md.vm
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-gridmix/src/site/markdown/GridMix.md.vm 
b/hadoop-tools/hadoop-gridmix/src/site/markdown/GridMix.md.vm
index 5e4199b..0b18d4f 100644
--- a/hadoop-tools/hadoop-gridmix/src/site/markdown/GridMix.md.vm
+++ b/hadoop-tools/hadoop-gridmix/src/site/markdown/GridMix.md.vm
@@ -75,16 +75,16 @@ Jobs submitted by GridMix have names of the form
 Usage
 -----
 
-Basic command-line usage without configuration parameters:
+Gridmix is provided as hadoop subcommand. Basic command-line usage without 
configuration parameters:
 
 ```
-java org.apache.hadoop.mapred.gridmix.Gridmix [-generate <size>] [-users 
<users-list>] <iopath> <trace>
+$ hadoop gridmix [-generate <size>] [-users <users-list>] <iopath> <trace>
 ```
 
 Basic command-line usage with configuration parameters:
 
 ```
-java org.apache.hadoop.mapred.gridmix.Gridmix \
+$ hadoop gridmix \
   -Dgridmix.client.submit.threads=10 -Dgridmix.output.directory=foo \
   [-generate <size>] [-users <users-list>] <iopath> <trace>
 ```
@@ -125,18 +125,6 @@ uncompressed. Use "-" as the value of this parameter if you
 want to pass an  *uncompressed*  trace via the standard
 input-stream of GridMix.
 
-GridMix expects certain library *JARs* to be present in  the *CLASSPATH*.
-One simple way to run GridMix is to use `hadoop jar` command to run it.
-You also need to add the JAR of Rumen to classpath for both of client and tasks
-as example shown below.
-
-```
-HADOOP_CLASSPATH=$HADOOP_HOME/share/hadoop/tools/lib/hadoop-rumen-2.5.1.jar \
-  $HADOOP_HOME/bin/hadoop jar 
$HADOOP_HOME/share/hadoop/tools/lib/hadoop-gridmix-2.5.1.jar \
-    -libjars $HADOOP_HOME/share/hadoop/tools/lib/hadoop-rumen-2.5.1.jar \
-    [-generate <size>] [-users <users-list>] <iopath> <trace>
-```
-
 The supported configuration parameters are explained in the
 following sections.
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to