hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [34/50] [abbrv] hadoop git commit: HADOOP-13111. convert hadoop gridmix to be dynamic
Date Thu, 12 May 2016 23:02:26 GMT
HADOOP-13111. convert hadoop gridmix to be dynamic


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

Branch: refs/heads/HADOOP-12930
Commit: 9e59ee2c2d94bafb9e3aeb05c463771cb2191a64
Parents: b498dec
Author: Allen Wittenauer <aw@apache.org>
Authored: Fri May 6 14:38:03 2016 -0700
Committer: Allen Wittenauer <aw@apache.org>
Committed: Thu May 12 16:01:27 2016 -0700

----------------------------------------------------------------------
 .../main/resources/assemblies/hadoop-tools.xml  |  8 +++++
 .../hadoop-common/src/main/bin/hadoop           |  8 +----
 .../src/main/shellprofile.d/hadoop-gridmix.sh   | 36 ++++++++++++++++++++
 3 files changed, 45 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/9e59ee2c/hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml
----------------------------------------------------------------------
diff --git a/hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml b/hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml
index 3909277..bc9548b 100644
--- a/hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml
+++ b/hadoop-assemblies/src/main/resources/assemblies/hadoop-tools.xml
@@ -126,6 +126,14 @@
       </includes>
     </fileSet>
     <fileSet>
+      <directory>../hadoop-gridmix/src/main/shellprofile.d</directory>
+      <includes>
+        <include>*</include>
+      </includes>
+      <outputDirectory>/libexec/shellprofile.d</outputDirectory>
+      <fileMode>0755</fileMode>
+    </fileSet>
+    <fileSet>
       <directory>../hadoop-rumen/target</directory>
       <outputDirectory>/share/hadoop/${hadoop.component}/sources</outputDirectory>
       <includes>

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9e59ee2c/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 dc752f5..b26525a 100755
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop
@@ -38,7 +38,6 @@ 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"
@@ -132,11 +131,6 @@ function hadoopcmd_case
     fs)
       HADOOP_CLASSNAME=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."
@@ -268,4 +262,4 @@ if [[ -n "${HADOOP_SUBCMD_SUPPORTDAEMONIZATION}" ]]; then
 else
   # shellcheck disable=SC2086
   hadoop_java_exec "${HADOOP_SUBCMD}" "${HADOOP_CLASSNAME}" "${HADOOP_SUBCMD_ARGS[@]}"
-fi
\ No newline at end of file
+fi

http://git-wip-us.apache.org/repos/asf/hadoop/blob/9e59ee2c/hadoop-tools/hadoop-gridmix/src/main/shellprofile.d/hadoop-gridmix.sh
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-gridmix/src/main/shellprofile.d/hadoop-gridmix.sh b/hadoop-tools/hadoop-gridmix/src/main/shellprofile.d/hadoop-gridmix.sh
new file mode 100755
index 0000000..b7887ba
--- /dev/null
+++ b/hadoop-tools/hadoop-gridmix/src/main/shellprofile.d/hadoop-gridmix.sh
@@ -0,0 +1,36 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+if ! declare -f hadoop_subcommand_gridmix >/dev/null 2>/dev/null; then
+
+  if [[ "${HADOOP_SHELL_EXECNAME}" = hadoop ]]; then
+    hadoop_add_subcommand "gridmix" "submit a mix of synthetic job, modeling a profiled from
production load"
+  fi
+
+## @description  gridmix command for hadoop
+## @audience     public
+## @stability    stable
+## @replaceable  yes
+function hadoop_subcommand_gridmix
+{
+  # shellcheck disable=SC2034
+  HADOOP_CLASSNAME=org.apache.hadoop.mapred.gridmix.Gridmix
+  hadoop_add_to_classpath_tools hadoop-rumen
+  hadoop_add_to_classpath_tools hadoop-gridmix
+}
+
+fi


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message