|
@@ -61,4 +61,14 @@ if [ -n "$SECONDARY_NAMENODES" ]; then
|
|
|
--script "$bin/hdfs" stop secondarynamenode
|
|
|
fi
|
|
|
|
|
|
+#---------------------------------------------------------
|
|
|
+# ZK Failover controllers, if auto-HA is enabled
|
|
|
+AUTOHA_ENABLED=$($HADOOP_PREFIX/bin/hdfs getconf -confKey dfs.ha.automatic-failover.enabled)
|
|
|
+if [ "$(echo "$AUTOHA_ENABLED" | tr A-Z a-z)" = "true" ]; then
|
|
|
+ echo "Stopping ZK Failover Controllers on NN hosts [$NAMENODES]"
|
|
|
+ "$HADOOP_PREFIX/sbin/hadoop-daemons.sh" \
|
|
|
+ --config "$HADOOP_CONF_DIR" \
|
|
|
+ --hostnames "$NAMENODES" \
|
|
|
+ --script "$bin/hdfs" stop zkfc
|
|
|
+fi
|
|
|
# eof
|