HDFS-12375. Fail to start/stop journalnodes using start-dfs.sh/stop-dfs.sh. Contributed by Bharat Viswanadham.
This commit is contained in:
parent
ecc85620e8
commit
415e5a157a
@ -144,22 +144,19 @@ fi
|
|||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
# quorumjournal nodes (if any)
|
# quorumjournal nodes (if any)
|
||||||
|
|
||||||
SHARED_EDITS_DIR=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -confKey dfs.namenode.shared.edits.dir 2>&-)
|
JOURNAL_NODES=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -journalNodes 2>&-)
|
||||||
|
|
||||||
case "${SHARED_EDITS_DIR}" in
|
if [[ "{$JOURNAL_NODES-}" != $'\n' ]]; then
|
||||||
qjournal://*)
|
echo "Starting journal nodes [${JOURNAL_NODES}]"
|
||||||
JOURNAL_NODES=$(echo "${SHARED_EDITS_DIR}" | sed 's,qjournal://\([^/]*\)/.*,\1,g; s/;/ /g; s/:[0-9]*//g')
|
|
||||||
echo "Starting journal nodes [${JOURNAL_NODES}]"
|
|
||||||
|
|
||||||
hadoop_uservar_su hdfs journalnode "${HADOOP_HDFS_HOME}/bin/hdfs" \
|
hadoop_uservar_su hdfs journalnode "${HADOOP_HDFS_HOME}/bin/hdfs" \
|
||||||
--workers \
|
--workers \
|
||||||
--config "${HADOOP_CONF_DIR}" \
|
--config "${HADOOP_CONF_DIR}" \
|
||||||
--hostnames "${JOURNAL_NODES}" \
|
--hostnames "${JOURNAL_NODES}" \
|
||||||
--daemon start \
|
--daemon start \
|
||||||
journalnode
|
journalnode
|
||||||
(( HADOOP_JUMBO_RETCOUNTER=HADOOP_JUMBO_RETCOUNTER + $? ))
|
(( HADOOP_JUMBO_RETCOUNTER=HADOOP_JUMBO_RETCOUNTER + $? ))
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
# ZK Failover controllers, if auto-HA is enabled
|
# ZK Failover controllers, if auto-HA is enabled
|
||||||
|
@ -100,21 +100,18 @@ fi
|
|||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
# quorumjournal nodes (if any)
|
# quorumjournal nodes (if any)
|
||||||
|
|
||||||
SHARED_EDITS_DIR=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -confKey dfs.namenode.shared.edits.dir 2>&-)
|
JOURNAL_NODES=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -journalNodes 2>&-)
|
||||||
|
|
||||||
case "${SHARED_EDITS_DIR}" in
|
if [[ "{$JOURNAL_NODES-}" != $'\n' ]]; then
|
||||||
qjournal://*)
|
echo "Stopping journal nodes [${JOURNAL_NODES}]"
|
||||||
JOURNAL_NODES=$(echo "${SHARED_EDITS_DIR}" | sed 's,qjournal://\([^/]*\)/.*,\1,g; s/;/ /g; s/:[0-9]*//g')
|
|
||||||
echo "Stopping journal nodes [${JOURNAL_NODES}]"
|
|
||||||
|
|
||||||
hadoop_uservar_su hdfs journalnode "${HADOOP_HDFS_HOME}/bin/hdfs" \
|
hadoop_uservar_su hdfs journalnode "${HADOOP_HDFS_HOME}/bin/hdfs" \
|
||||||
--workers \
|
--workers \
|
||||||
--config "${HADOOP_CONF_DIR}" \
|
--config "${HADOOP_CONF_DIR}" \
|
||||||
--hostnames "${JOURNAL_NODES}" \
|
--hostnames "${JOURNAL_NODES}" \
|
||||||
--daemon stop \
|
--daemon stop \
|
||||||
journalnode
|
journalnode
|
||||||
;;
|
fi
|
||||||
esac
|
|
||||||
|
|
||||||
#---------------------------------------------------------
|
#---------------------------------------------------------
|
||||||
# ZK Failover controllers, if auto-HA is enabled
|
# ZK Failover controllers, if auto-HA is enabled
|
||||||
|
Loading…
Reference in New Issue
Block a user