Browse Source

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/branches/branch-1@1383562 13f79535-47bb-0310-9956-ffa450edef68
Suresh Srinivas 12 years ago
parent
commit
73188d2cfa
3 changed files with 12 additions and 11 deletions
  1. 3 0
      CHANGES.txt
  2. 4 3
      bin/hadoop-config.sh
  3. 5 8
      bin/slaves.sh

+ 3 - 0
CHANGES.txt

@@ -236,6 +236,9 @@ Release 1.2.0 - unreleased
     MAPREDUCE-4576. Large dist cache can block tasktracker heartbeat
     MAPREDUCE-4576. Large dist cache can block tasktracker heartbeat
     (Robert Evans via tgraves)
     (Robert Evans via tgraves)
 
 
+    HADOOP-8767. Secondary namenode is started on slave nodes instead of
+    master nodes. (Giovanni Delussu via suresh)
+
 Release 1.1.0 - unreleased
 Release 1.1.0 - unreleased
 
 
   INCOMPATIBLE CHANGES
   INCOMPATIBLE CHANGES

+ 4 - 3
bin/hadoop-config.sh

@@ -53,6 +53,10 @@ else
 fi
 fi
 HADOOP_CONF_DIR="${HADOOP_CONF_DIR:-$HADOOP_PREFIX/$DEFAULT_CONF_DIR}"
 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
+
 #check to see it is specified whether to use the slaves or the
 #check to see it is specified whether to use the slaves or the
 # masters file
 # masters file
 if [ $# -gt 1 ]
 if [ $# -gt 1 ]
@@ -66,9 +70,6 @@ then
     fi
     fi
 fi
 fi
 
 
-if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
-  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
-fi
 
 
 if [ "$HADOOP_HOME_WARN_SUPPRESS" = "" ] && [ "$HADOOP_HOME" != "" ]; then
 if [ "$HADOOP_HOME_WARN_SUPPRESS" = "" ] && [ "$HADOOP_HOME" != "" ]; then
   echo "Warning: \$HADOOP_HOME is deprecated." 1>&2
   echo "Warning: \$HADOOP_HOME is deprecated." 1>&2

+ 5 - 8
bin/slaves.sh

@@ -38,21 +38,18 @@ fi
 bin=`dirname "$0"`
 bin=`dirname "$0"`
 bin=`cd "$bin"; pwd`
 bin=`cd "$bin"; pwd`
 
 
-if [ -e "$bin/../libexec/hadoop-config.sh" ]; then
-  . "$bin"/../libexec/hadoop-config.sh
-else
-  . "$bin/hadoop-config.sh"
-fi
-
 # If the slaves file is specified in the command line,
 # If the slaves file is specified in the command line,
 # then it takes precedence over the definition in 
 # then it takes precedence over the definition in 
 # hadoop-env.sh. Save it here.
 # hadoop-env.sh. Save it here.
 HOSTLIST=$HADOOP_SLAVES
 HOSTLIST=$HADOOP_SLAVES
 
 
-if [ -f "${HADOOP_CONF_DIR}/hadoop-env.sh" ]; then
-  . "${HADOOP_CONF_DIR}/hadoop-env.sh"
+if [ -e "$bin/../libexec/hadoop-config.sh" ]; then
+  . "$bin"/../libexec/hadoop-config.sh
+else
+  . "$bin/hadoop-config.sh"
 fi
 fi
 
 
+
 if [ "$HOSTLIST" = "" ]; then
 if [ "$HOSTLIST" = "" ]; then
   if [ "$HADOOP_SLAVES" = "" ]; then
   if [ "$HADOOP_SLAVES" = "" ]; then
     export HOSTLIST="${HADOOP_CONF_DIR}/slaves"
     export HOSTLIST="${HADOOP_CONF_DIR}/slaves"