HDFS-3935. Add JournalNode to the start/stop scripts. Contributed by Andy Isaacson.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1410584 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a23e8b0929
commit
51ca2fd3e9
|
@ -159,6 +159,8 @@ Trunk (Unreleased)
|
|||
|
||||
HDFS-4153. Add START_MSG/SHUTDOWN_MSG for JournalNode. (liang xie via atm)
|
||||
|
||||
HDFS-3935. Add JournalNode to the start/stop scripts (Andy Isaacson via todd)
|
||||
|
||||
OPTIMIZATIONS
|
||||
|
||||
BUG FIXES
|
||||
|
|
|
@ -85,6 +85,21 @@ if [ -n "$SECONDARY_NAMENODES" ]; then
|
|||
--script "$bin/hdfs" start secondarynamenode
|
||||
fi
|
||||
|
||||
#---------------------------------------------------------
|
||||
# quorumjournal nodes (if any)
|
||||
|
||||
SHARED_EDITS_DIR=$($HADOOP_PREFIX/bin/hdfs getconf -confKey dfs.namenode.shared.edits.dir 2>&-)
|
||||
|
||||
case "$SHARED_EDITS_DIR" in
|
||||
qjournal://*)
|
||||
JOURNAL_NODES=$(echo "$SHARED_EDITS_DIR" | sed 's,qjournal://\([^/]*\)/.*,\1,g; s/;/ /g; s/:[0-9]*//g')
|
||||
echo "Starting journal nodes [$JOURNAL_NODES]"
|
||||
"$HADOOP_PREFIX/sbin/hadoop-daemons.sh" \
|
||||
--config "$HADOOP_CONF_DIR" \
|
||||
--hostnames "$JOURNAL_NODES" \
|
||||
--script "$bin/hdfs" start journalnode ;;
|
||||
esac
|
||||
|
||||
#---------------------------------------------------------
|
||||
# ZK Failover controllers, if auto-HA is enabled
|
||||
AUTOHA_ENABLED=$($HADOOP_PREFIX/bin/hdfs getconf -confKey dfs.ha.automatic-failover.enabled)
|
||||
|
|
|
@ -61,6 +61,21 @@ if [ -n "$SECONDARY_NAMENODES" ]; then
|
|||
--script "$bin/hdfs" stop secondarynamenode
|
||||
fi
|
||||
|
||||
#---------------------------------------------------------
|
||||
# quorumjournal nodes (if any)
|
||||
|
||||
SHARED_EDITS_DIR=$($HADOOP_PREFIX/bin/hdfs getconf -confKey dfs.namenode.shared.edits.dir 2>&-)
|
||||
|
||||
case "$SHARED_EDITS_DIR" in
|
||||
qjournal://*)
|
||||
JOURNAL_NODES=$(echo "$SHARED_EDITS_DIR" | sed 's,qjournal://\([^/]*\)/.*,\1,g; s/;/ /g; s/:[0-9]*//g')
|
||||
echo "Stopping journal nodes [$JOURNAL_NODES]"
|
||||
"$HADOOP_PREFIX/sbin/hadoop-daemons.sh" \
|
||||
--config "$HADOOP_CONF_DIR" \
|
||||
--hostnames "$JOURNAL_NODES" \
|
||||
--script "$bin/hdfs" stop journalnode ;;
|
||||
esac
|
||||
|
||||
#---------------------------------------------------------
|
||||
# ZK Failover controllers, if auto-HA is enabled
|
||||
AUTOHA_ENABLED=$($HADOOP_PREFIX/bin/hdfs getconf -confKey dfs.ha.automatic-failover.enabled)
|
||||
|
|
Loading…
Reference in New Issue