YARN-5937. stop-yarn.sh is not able to gracefully stop node managers. Contributed by Weiwei Yang.
This commit is contained in:
parent
9594c35dcb
commit
41db07d532
|
@ -42,6 +42,14 @@ else
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# stop nodemanager
|
||||||
|
echo "Stopping nodemanagers"
|
||||||
|
"${HADOOP_YARN_HOME}/bin/yarn" \
|
||||||
|
--config "${HADOOP_CONF_DIR}" \
|
||||||
|
--workers \
|
||||||
|
--daemon stop \
|
||||||
|
nodemanager
|
||||||
|
|
||||||
# stop resourceManager
|
# stop resourceManager
|
||||||
HARM=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -confKey yarn.resourcemanager.ha.enabled 2>&-)
|
HARM=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -confKey yarn.resourcemanager.ha.enabled 2>&-)
|
||||||
if [[ ${HARM} = "false" ]]; then
|
if [[ ${HARM} = "false" ]]; then
|
||||||
|
@ -67,14 +75,6 @@ else
|
||||||
resourcemanager
|
resourcemanager
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# stop nodemanager
|
|
||||||
echo "Stopping nodemanagers"
|
|
||||||
"${HADOOP_YARN_HOME}/bin/yarn" \
|
|
||||||
--config "${HADOOP_CONF_DIR}" \
|
|
||||||
--workers \
|
|
||||||
--daemon stop \
|
|
||||||
nodemanager
|
|
||||||
|
|
||||||
# stop proxyserver
|
# stop proxyserver
|
||||||
PROXYSERVER=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -confKey yarn.web-proxy.address 2>&- | cut -f1 -d:)
|
PROXYSERVER=$("${HADOOP_HDFS_HOME}/bin/hdfs" getconf -confKey yarn.web-proxy.address 2>&- | cut -f1 -d:)
|
||||||
if [[ -n ${PROXYSERVER} ]]; then
|
if [[ -n ${PROXYSERVER} ]]; then
|
||||||
|
|
Loading…
Reference in New Issue