hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject [2/2] hadoop git commit: HADOOP-13153. fix typo in debug statement for dynamic subcommands
Date Sun, 15 May 2016 15:29:06 GMT
HADOOP-13153. fix typo in debug statement for dynamic subcommands


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

Branch: refs/heads/HADOOP-12930
Commit: 1d5cc11098d1411b57a83641a38f190930e58a58
Parents: fc6e75e
Author: Allen Wittenauer <aw@apache.org>
Authored: Sun May 15 08:29:01 2016 -0700
Committer: Allen Wittenauer <aw@apache.org>
Committed: Sun May 15 08:29:01 2016 -0700

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/src/main/bin/hadoop |  2 +-
 .../src/test/scripts/hadoop_subcommands.bats            | 12 ++++++++++++
 hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs       |  2 +-
 .../hadoop-hdfs/src/test/scripts/hdfs_subcommands.bats  | 12 ++++++++++++
 hadoop-mapreduce-project/bin/mapred                     |  2 +-
 hadoop-yarn-project/hadoop-yarn/bin/yarn                |  2 +-
 6 files changed, 28 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/1d5cc110/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 0f6982b..6cf872c 100755
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop
@@ -197,7 +197,7 @@ shift
 HADOOP_SUBCMD_ARGS=("$@")
 
 if declare -f hadoop_subcommand_"${HADOOP_SUBCMD}" >/dev/null 2>&1; then
-  hadoop_debug "Calling dynamically: hadoop_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[$*]}"
+  hadoop_debug "Calling dynamically: hadoop_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[*]}"
   "hadoop_subcommand_${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"
 else
   hadoopcmd_case "${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1d5cc110/hadoop-common-project/hadoop-common/src/test/scripts/hadoop_subcommands.bats
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/scripts/hadoop_subcommands.bats
b/hadoop-common-project/hadoop-common/src/test/scripts/hadoop_subcommands.bats
index c3832ca..c004a30 100755
--- a/hadoop-common-project/hadoop-common/src/test/scripts/hadoop_subcommands.bats
+++ b/hadoop-common-project/hadoop-common/src/test/scripts/hadoop_subcommands.bats
@@ -41,6 +41,12 @@ hadoop_subcommand_envcheck ()
   echo ${HADOOP_SHELL_EXECNAME}
   exit 0
 }
+
+hadoop_subcommand_multi ()
+{
+  echo $2
+  exit 0
+}
 TOKEN
   chmod a+rx "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh"
 }
@@ -64,3 +70,9 @@ TOKEN
   run "${BATS_TEST_DIRNAME}/../../main/bin/hadoop" envcheck
   [ "${output}" = hadoop ]
 }
+
+@test "hadoop_subcommand (multiparams)" {
+  subcommandsetup
+  run "${BATS_TEST_DIRNAME}/../../main/bin/hadoop" multi 1 2
+  [ "${output}" = 2 ]
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1d5cc110/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 a2bf057..2a29d17 100755
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/bin/hdfs
@@ -279,7 +279,7 @@ shift
 HADOOP_SUBCMD_ARGS=("$@")
 
 if declare -f hdfs_subcommand_"${HADOOP_SUBCMD}" >/dev/null 2>&1; then
-  hadoop_debug "Calling dynamically: hdfs_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[$*]}"
+  hadoop_debug "Calling dynamically: hdfs_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[*]}"
   "hdfs_subcommand_${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"
 else
   hdfscmd_case "${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1d5cc110/hadoop-hdfs-project/hadoop-hdfs/src/test/scripts/hdfs_subcommands.bats
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/scripts/hdfs_subcommands.bats b/hadoop-hdfs-project/hadoop-hdfs/src/test/scripts/hdfs_subcommands.bats
index d4ea000..d074ab9 100755
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/scripts/hdfs_subcommands.bats
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/scripts/hdfs_subcommands.bats
@@ -41,6 +41,12 @@ hdfs_subcommand_envcheck ()
   echo ${HADOOP_SHELL_EXECNAME}
   exit 0
 }
+
+hdfs_subcommand_multi ()
+{
+  echo $2
+  exit 0
+}
 TOKEN
   chmod a+rx "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh"
 }
@@ -64,3 +70,9 @@ TOKEN
   run "${BATS_TEST_DIRNAME}/../../main/bin/hdfs" envcheck
   [ "${output}" = hdfs ]
 }
+
+@test "hdfs_subcommand (multiparams)" {
+  subcommandsetup
+  run "${BATS_TEST_DIRNAME}/../../main/bin/hdfs" multi 1 2
+  [ "${output}" = 2 ]
+}

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1d5cc110/hadoop-mapreduce-project/bin/mapred
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/bin/mapred b/hadoop-mapreduce-project/bin/mapred
index 0df093c..046d48c 100755
--- a/hadoop-mapreduce-project/bin/mapred
+++ b/hadoop-mapreduce-project/bin/mapred
@@ -144,7 +144,7 @@ shift
 HADOOP_SUBCMD_ARGS=("$@")
 
 if declare -f mapred_subcommand_"${HADOOP_SUBCMD}" >/dev/null 2>&1; then
-  hadoop_debug "Calling dynamically: mapred_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[$*]}"
+  hadoop_debug "Calling dynamically: mapred_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[*]}"
   "mapred_subcommand_${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"
 else
   mapredcmd_case "${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"

http://git-wip-us.apache.org/repos/asf/hadoop/blob/1d5cc110/hadoop-yarn-project/hadoop-yarn/bin/yarn
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/bin/yarn b/hadoop-yarn-project/hadoop-yarn/bin/yarn
index 45b3fb9..878c95f 100755
--- a/hadoop-yarn-project/hadoop-yarn/bin/yarn
+++ b/hadoop-yarn-project/hadoop-yarn/bin/yarn
@@ -256,7 +256,7 @@ shift
 HADOOP_SUBCMD_ARGS=("$@")
 
 if declare -f yarn_subcommand_"${HADOOP_SUBCMD}" >/dev/null 2>&1; then
-  hadoop_debug "Calling dynamically: yarn_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[$*]}"
+  hadoop_debug "Calling dynamically: yarn_subcommand_${HADOOP_SUBCMD} ${HADOOP_SUBCMD_ARGS[*]}"
   "yarn_subcommand_${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"
 else
   yarncmd_case "${HADOOP_SUBCMD}" "${HADOOP_SUBCMD_ARGS[@]}"


---------------------------------------------------------------------
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