From ec8e192e8cc3fae06d660fe136a5215bb876ffdf Mon Sep 17 00:00:00 2001 From: lishuming Date: Tue, 19 Sep 2017 09:00:18 +0800 Subject: [PATCH 1/2] Fix how to check Ambari Collector script's distributed-hbase condition --- .../conf/unix/ambari-metrics-collector | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector index 552be4877f2..31b30670a5d 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector @@ -231,7 +231,7 @@ function start() # hbase_daemon "zookeeper" "start" # hbase_daemon "master" "start" # hbase_daemon "regionserver" "start" - if [ !"${DISTRIBUTED_HBASE}" ]; then + if [[ "${DISTRIBUTED_HBASE}" == "false" || "${DISTRIBUTED_HBASE}" == "False" ]]; then echo "$(date) Starting HBase." | tee -a $STARTUPFILE hbase_daemon "master" "start" else @@ -332,7 +332,7 @@ function stop() fi #stop hbase daemons - if [ !"${DISTRIBUTED_HBASE}" ]; then + if [[ "${DISTRIBUTED_HBASE}" == "false" || "${DISTRIBUTED_HBASE}" == "False" ]]; then echo "Stopping HBase master" | tee -a $STARTUPFILE hbase_daemon "master" "stop" fi From f1e2270a45afe31d468bb603e4d2e451cda38c1e Mon Sep 17 00:00:00 2001 From: lishuming Date: Tue, 14 Nov 2017 19:45:50 +0800 Subject: [PATCH 2/2] Change check DISTRIBUTED_HBASE var function --- .../conf/unix/ambari-metrics-collector | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector index 31b30670a5d..74a15ea0f8c 100644 --- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector +++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector @@ -231,7 +231,7 @@ function start() # hbase_daemon "zookeeper" "start" # hbase_daemon "master" "start" # hbase_daemon "regionserver" "start" - if [[ "${DISTRIBUTED_HBASE}" == "false" || "${DISTRIBUTED_HBASE}" == "False" ]]; then + if [ "${DISTRIBUTED_HBASE}" = false ]; then echo "$(date) Starting HBase." | tee -a $STARTUPFILE hbase_daemon "master" "start" else @@ -332,7 +332,7 @@ function stop() fi #stop hbase daemons - if [[ "${DISTRIBUTED_HBASE}" == "false" || "${DISTRIBUTED_HBASE}" == "False" ]]; then + if [ "${DISTRIBUTED_HBASE}" = false ]; then echo "Stopping HBase master" | tee -a $STARTUPFILE hbase_daemon "master" "stop" fi