HDFS-2893. svn merge -c 1240928 from trunk

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-0.23@1240930 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Eli Collins 2012-02-06 08:56:06 +00:00
parent 556ad36563
commit db4d28d3bb
4 changed files with 9 additions and 26 deletions

View File

@ -219,6 +219,9 @@ Release 0.23.1 - UNRELEASED
HDFS-2889. getNumCurrentReplicas is package private but should be public on HDFS-2889. getNumCurrentReplicas is package private but should be public on
0.23 (see HDFS-2408). (Gregory Chanan via atm) 0.23 (see HDFS-2408). (Gregory Chanan via atm)
HDFS-2893. The start/stop scripts don't start/stop the 2NN when
using the default configuration. (eli)
Release 0.23.0 - 2011-11-01 Release 0.23.0 - 2011-11-01
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -59,7 +59,7 @@ echo "Starting namenodes on [$NAMENODES]"
--script "$bin/hdfs" start namenode $nameStartOpt --script "$bin/hdfs" start namenode $nameStartOpt
#--------------------------------------------------------- #---------------------------------------------------------
# datanodes (using defalut slaves file) # datanodes (using default slaves file)
if [ -n "$HADOOP_SECURE_DN_USER" ]; then if [ -n "$HADOOP_SECURE_DN_USER" ]; then
echo \ echo \
@ -74,22 +74,13 @@ fi
#--------------------------------------------------------- #---------------------------------------------------------
# secondary namenodes (if any) # secondary namenodes (if any)
# if there are no secondary namenodes configured it returns
# 0.0.0.0 or empty string
SECONDARY_NAMENODES=$($HADOOP_PREFIX/bin/hdfs getconf -secondarynamenodes 2>&-) SECONDARY_NAMENODES=$($HADOOP_PREFIX/bin/hdfs getconf -secondarynamenodes 2>&-)
SECONDARY_NAMENODES=${SECONDARY_NAMENODES:='0.0.0.0'}
if [ "$SECONDARY_NAMENODES" = '0.0.0.0' ] ; then
echo \
"Secondary namenodes are not configured. " \
"Cannot start secondary namenodes."
else
echo "Starting secondary namenodes [$SECONDARY_NAMENODES]" echo "Starting secondary namenodes [$SECONDARY_NAMENODES]"
"$HADOOP_PREFIX/sbin/hadoop-daemons.sh" \ "$HADOOP_PREFIX/sbin/hadoop-daemons.sh" \
--config "$HADOOP_CONF_DIR" \ --config "$HADOOP_CONF_DIR" \
--hostnames "$SECONDARY_NAMENODES" \ --hostnames "$SECONDARY_NAMENODES" \
--script "$bin/hdfs" start secondarynamenode --script "$bin/hdfs" start secondarynamenode
fi
# eof # eof

View File

@ -50,22 +50,13 @@ fi
#--------------------------------------------------------- #---------------------------------------------------------
# secondary namenodes (if any) # secondary namenodes (if any)
# if there are no secondary namenodes configured it returns
# 0.0.0.0 or empty string
SECONDARY_NAMENODES=$($HADOOP_PREFIX/bin/hdfs getconf -secondarynamenodes 2>&-) SECONDARY_NAMENODES=$($HADOOP_PREFIX/bin/hdfs getconf -secondarynamenodes 2>&-)
SECONDARY_NAMENODES=${SECONDARY_NAMENODES:-'0.0.0.0'}
if [ "$SECONDARY_NAMENODES" = '0.0.0.0' ] ; then
echo \
"Secondary namenodes are not configured. " \
"Cannot stop secondary namenodes."
else
echo "Stopping secondary namenodes [$SECONDARY_NAMENODES]" echo "Stopping secondary namenodes [$SECONDARY_NAMENODES]"
"$HADOOP_PREFIX/sbin/hadoop-daemons.sh" \ "$HADOOP_PREFIX/sbin/hadoop-daemons.sh" \
--config "$HADOOP_CONF_DIR" \ --config "$HADOOP_CONF_DIR" \
--hostnames "$SECONDARY_NAMENODES" \ --hostnames "$SECONDARY_NAMENODES" \
--script "$bin/hdfs" stop secondarynamenode --script "$bin/hdfs" stop secondarynamenode
fi
# eof # eof

View File

@ -253,9 +253,7 @@
The secondary NameNode merges the fsimage and the edits log files periodically The secondary NameNode merges the fsimage and the edits log files periodically
and keeps edits log size within a limit. It is usually run on a and keeps edits log size within a limit. It is usually run on a
different machine than the primary NameNode since its memory requirements different machine than the primary NameNode since its memory requirements
are on the same order as the primary NameNode. The secondary are on the same order as the primary NameNode.
NameNode is started by <code>bin/start-dfs.sh</code> on the nodes
specified in <code>conf/masters</code> file.
</p> </p>
<p> <p>
The start of the checkpoint process on the secondary NameNode is The start of the checkpoint process on the secondary NameNode is