You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2015/09/19 12:45:36 UTC
ambari git commit: AMBARI-13149 Ambari Metrics collector failed to
start on suse (dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk 1065bc515 -> 131c8cd51
AMBARI-13149 Ambari Metrics collector failed to start on suse (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/131c8cd5
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/131c8cd5
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/131c8cd5
Branch: refs/heads/trunk
Commit: 131c8cd510c23a4e3d7c9b305f5064cce051b947
Parents: 1065bc5
Author: Dmytro Sen <ds...@apache.org>
Authored: Sat Sep 19 13:45:22 2015 +0300
Committer: Dmytro Sen <ds...@apache.org>
Committed: Sat Sep 19 13:45:22 2015 +0300
----------------------------------------------------------------------
.../conf/unix/ambari-metrics-collector | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/131c8cd5/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
----------------------------------------------------------------------
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 fe73ff1..dd7ee22 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
+++ b/ambari-metrics/ambari-metrics-timelineservice/conf/unix/ambari-metrics-collector
@@ -29,6 +29,9 @@ DAEMON_NAME=timelineserver
COLLECTOR_CONF_DIR=/etc/ambari-metrics-collector/conf
HBASE_CONF_DIR=/etc/ams-hbase/conf
+HBASE_CMD=${HBASE_DIR}/bin/hbase
+
+METRIC_TABLE_NAME=METRIC_AGGREGATE_DAILY
METRIC_COLLECTOR=ambari-metrics-collector
AMS_LOG_DIR=/var/log/ambari-metrics-collector
@@ -197,6 +200,22 @@ function start()
fi
echo "Collector successfully started."
+ echo "Initializing Ambari Metrics data model"
+ # Wait until METRIC_RECORD table created
+ for retry in {1..10}
+ do
+ echo 'list' | ${HBASE_CMD} --config ${HBASE_CONF_DIR} shell | grep ^${METRIC_TABLE_NAME} > /dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ echo "Ambari Metrics data model initialization completed."
+ break
+ fi
+ sleep 5
+ done
+ if [ $? -ne 0 ]; then
+ echo "Ambari Metrics data model initialization failed."
+ exit -1
+ fi
+
}
function stop()