From 043a27a3ef0f3d5a0163814dc34f06d42a21eec9 Mon Sep 17 00:00:00 2001 From: Suresh Srinivas Date: Tue, 11 Sep 2012 19:10:01 +0000 Subject: [PATCH] HADOOP-8767. Secondary namenode is started on slave nodes instead of master nodes. Contributed by Giovanni Delussu. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1383560 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../hadoop-common/src/main/bin/hadoop-config.sh | 7 ++++--- hadoop-common-project/hadoop-common/src/main/bin/slaves.sh | 3 --- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index f93617c706..442b060ba3 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -205,6 +205,9 @@ Trunk (Unreleased) HADOOP-8786. HttpServer continues to start even if AuthenticationFilter fails to init (todd) + HADOOP-8767. Secondary namenode is started on slave nodes instead of + master nodes. (Giovanni Delussu via suresh) + OPTIMIZATIONS HADOOP-7761. Improve the performance of raw comparisons. (todd) diff --git a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh index 43cf597484..94fa4a44cb 100644 --- a/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/hadoop-config.sh @@ -74,6 +74,10 @@ fi export HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_PREFIX/$DEFAULT_CONF_DIR}" +if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then + . "${HADOOP_CONF_DIR}/hadoop-env.sh" +fi + # User can specify hostnames or a file where the hostnames are (not both) if [[ ( "$HADOOP_SLAVES" != '' ) && ( "$HADOOP_SLAVE_NAMES" != '' ) ]] ; then echo \ @@ -113,9 +117,6 @@ case "`uname`" in CYGWIN*) cygwin=true;; esac -if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then - . "${HADOOP_CONF_DIR}/hadoop-env.sh" -fi # check if net.ipv6.bindv6only is set to 1 bindv6only=$(/sbin/sysctl -n net.ipv6.bindv6only 2> /dev/null) diff --git a/hadoop-common-project/hadoop-common/src/main/bin/slaves.sh b/hadoop-common-project/hadoop-common/src/main/bin/slaves.sh index 016392fedb..fe164a8924 100755 --- a/hadoop-common-project/hadoop-common/src/main/bin/slaves.sh +++ b/hadoop-common-project/hadoop-common/src/main/bin/slaves.sh @@ -42,9 +42,6 @@ DEFAULT_LIBEXEC_DIR="$bin"/../libexec HADOOP_LIBEXEC_DIR=${HADOOP_LIBEXEC_DIR:-$DEFAULT_LIBEXEC_DIR} . $HADOOP_LIBEXEC_DIR/hadoop-config.sh -if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then - . "${HADOOP_CONF_DIR}/hadoop-env.sh" -fi # Where to start the script, see hadoop-config.sh # (it set up the variables based on command line options)