You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by av...@apache.org on 2017/02/28 01:26:01 UTC
ambari git commit: AMBARI-20219 : Grafana Start Failed on HDF
cluster. (avijayan)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 23861e4b6 -> 4fd566555
AMBARI-20219 : Grafana Start Failed on HDF cluster. (avijayan)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/4fd56655
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/4fd56655
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/4fd56655
Branch: refs/heads/branch-2.5
Commit: 4fd5665553737e7af9e9579c92b788108fa88978
Parents: 23861e4
Author: Aravindan Vijayan <av...@hortonworks.com>
Authored: Mon Feb 27 17:25:50 2017 -0800
Committer: Aravindan Vijayan <av...@hortonworks.com>
Committed: Mon Feb 27 17:25:50 2017 -0800
----------------------------------------------------------------------
.../conf/unix/ambari-metrics-grafana | 17 +++++++++++++----
.../timeline/TimelineMetricConfiguration.java | 10 ++++++++--
2 files changed, 21 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/4fd56655/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana
index 8a8ac8f..dba2f5f 100644
--- a/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana
+++ b/ambari-metrics/ambari-metrics-grafana/conf/unix/ambari-metrics-grafana
@@ -94,7 +94,7 @@ function isRunning() {
case "$1" in
start)
- echo $"Starting $DESC: .... " >> $LOG_FILE
+ echo $"$(date) Starting $DESC: .... " >> $LOG_FILE
isRunning
if [ $? -eq 0 ]; then
@@ -116,10 +116,19 @@ case "$1" in
return=$?
if [ $return -eq 0 ]
then
- sleep 5
- # check if pid file has been written two
+ for i in {1..10}
+ do
+ sleep 2
+ # check if pid file has been written to
+ if [ -s $PID_FILE ]; then
+ echo " $(date) pid_file has been written to" >> $LOG_FILE
+ break
+ else
+ echo " $(date) pid_file not yet written to" >> $LOG_FILE
+ fi
+ done
if ! [[ -s $PID_FILE ]]; then
- echo "Start FAILED because daemon did not write pid in pid_file" >> $LOG_FILE
+ echo " $(date) Start FAILED because daemon did not write pid in pid_file after 20 seconds" >> $LOG_FILE
exit 1
fi
i=0
http://git-wip-us.apache.org/repos/asf/ambari/blob/4fd56655/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricConfiguration.java
----------------------------------------------------------------------
diff --git a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricConfiguration.java b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricConfiguration.java
index cc751c0..ab1716a 100644
--- a/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricConfiguration.java
+++ b/ambari-metrics/ambari-metrics-timelineservice/src/main/java/org/apache/hadoop/yarn/server/applicationhistoryservice/metrics/timeline/TimelineMetricConfiguration.java
@@ -467,6 +467,12 @@ public class TimelineMetricConfiguration {
Set<String> whitelist = new HashSet<>();
try(InputStream inputStream = classLoader.getResourceAsStream(AMSHBASE_METRICS_WHITESLIST_FILE)) {
+
+ if (inputStream == null) {
+ LOG.info("ams-hbase metrics whitelist file not present.");
+ return Collections.EMPTY_SET;
+ }
+
br = new BufferedReader(new InputStreamReader(inputStream));
while ((strLine = br.readLine()) != null) {
@@ -476,8 +482,8 @@ public class TimelineMetricConfiguration {
}
whitelist.add(strLine);
}
- } catch (IOException ioEx) {
- LOG.error("Unable to parse ams-hbase metric whitelist file", ioEx);
+ } catch (Exception ex) {
+ LOG.error("Unable to read ams-hbase metric whitelist file", ex);
return Collections.EMPTY_SET;
}