hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a.@apache.org
Subject hadoop git commit: HADOOP-11025. hadoop-daemons.sh should just call hdfs directly (Masatake Iwasaki via aw)
Date Wed, 12 Nov 2014 23:47:09 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 782abbb00 -> 306f0c9ce


HADOOP-11025. hadoop-daemons.sh should just call hdfs directly (Masatake Iwasaki via aw)


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

Branch: refs/heads/trunk
Commit: 306f0c9cea2d35f3f9ebf25ad6af99723e4c7288
Parents: 782abbb
Author: Allen Wittenauer <aw@apache.org>
Authored: Wed Nov 12 15:46:58 2014 -0800
Committer: Allen Wittenauer <aw@apache.org>
Committed: Wed Nov 12 15:46:58 2014 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt  |  3 +++
 .../hadoop-common/src/main/bin/hadoop-daemons.sh | 19 ++++++++++++++-----
 .../hadoop-common/src/main/conf/hadoop-env.sh    |  3 ++-
 3 files changed, 19 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/306f0c9c/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 480737b..59773ae 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -135,6 +135,9 @@ Trunk (Unreleased)
 
     HADOOP-11231. Remove dead code in ServletUtil. (Li Lu via wheat9)
 
+    HADOOP-11025. hadoop-daemons.sh should just call hdfs directly (Masatake
+    Iwasaki via aw)
+
   BUG FIXES
 
     HADOOP-9451. Fault single-layer config if node group topology is enabled.

http://git-wip-us.apache.org/repos/asf/hadoop/blob/306f0c9c/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemons.sh
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemons.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemons.sh
index db06612..20d7e4a 100755
--- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemons.sh
+++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-daemons.sh
@@ -36,10 +36,10 @@ fi
 HADOOP_LIBEXEC_DIR="${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR}"
 # shellcheck disable=SC2034
 HADOOP_NEW_CONFIG=true
-if [[ -f "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh" ]]; then
-  . "${HADOOP_LIBEXEC_DIR}/hadoop-config.sh"
+if [[ -f "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh" ]]; then
+  . "${HADOOP_LIBEXEC_DIR}/hdfs-config.sh"
 else
-  echo "ERROR: Cannot execute ${HADOOP_LIBEXEC_DIR}/hadoop-config.sh." 2>&1
+  echo "ERROR: Cannot execute ${HADOOP_LIBEXEC_DIR}/hdfs-config.sh." 2>&1
   exit 1
 fi
 
@@ -47,5 +47,14 @@ if [[ $# = 0 ]]; then
   hadoop_exit_with_usage 1
 fi
 
-hadoop_connect_to_hosts "${bin}/hadoop-daemon.sh" \
---config "${HADOOP_CONF_DIR}" "$@"
+daemonmode=$1
+shift
+
+if [[ -z "${HADOOP_HDFS_HOME}" ]]; then
+  hdfsscript="${HADOOP_PREFIX}/bin/hdfs"
+else
+  hdfsscript="${HADOOP_HDFS_HOME}/bin/hdfs"
+fi
+
+hadoop_connect_to_hosts "$hdfsscript" \
+    --config "${HADOOP_CONF_DIR}" --daemon "${daemonmode}" "$@"

http://git-wip-us.apache.org/repos/asf/hadoop/blob/306f0c9c/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh b/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh
index b0963af..af8e544 100644
--- a/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh
+++ b/hadoop-common-project/hadoop-common/src/main/conf/hadoop-env.sh
@@ -175,7 +175,8 @@ esac
 # This sets the hadoop.root.logger property
 # export HADOOP_ROOT_LOGGER=INFO,console
 
-# Default log level for daemons spawned explicitly by hadoop-daemon.sh
+# Default log level for daemons spawned explicitly by 
+# --daemon option of hadoop, hdfs, mapred and yarn command.
 # This sets the hadoop.root.logger property
 # export HADOOP_DAEMON_ROOT_LOGGER=INFO,RFA
 


Mime
View raw message