ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jonathanhur...@apache.org
Subject [08/22] ambari git commit: AMBARI-20918. AmbariServer Metrics service cannot be disabled
Date Mon, 08 May 2017 14:02:59 GMT
AMBARI-20918. AmbariServer Metrics service cannot be disabled


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/37960b42
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/37960b42
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/37960b42

Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 37960b421d9e559f54ac1b1614e861d14f7cd389
Parents: fa83229
Author: Attila Doroszlai <adoroszlai@hortonworks.com>
Authored: Wed May 3 14:34:02 2017 +0200
Committer: Attila Doroszlai <adoroszlai@hortonworks.com>
Committed: Thu May 4 10:16:53 2017 +0200

----------------------------------------------------------------------
 .../org/apache/ambari/server/configuration/Configuration.java   | 5 +++++
 .../java/org/apache/ambari/server/controller/AmbariServer.java  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/37960b42/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
index ff20834..114046f 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
@@ -5158,6 +5158,11 @@ public class Configuration {
     return Boolean.parseBoolean(getProperty(TIMELINE_METRICS_CACHE_DISABLE));
   }
 
+  /** @see #AMBARISERVER_METRICS_DISABLE */
+  public boolean isMetricsServiceDisabled() {
+    return Boolean.parseBoolean(getProperty(AMBARISERVER_METRICS_DISABLE));
+  }
+
   /**
    * Constant fudge factor subtracted from the cache update requests to
    * account for unavailability of data on the trailing edge due to buffering.

http://git-wip-us.apache.org/repos/asf/ambari/blob/37960b42/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
index bc6b428..2f799b7 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java
@@ -576,7 +576,7 @@ public class AmbariServer {
       serviceManager.startAsync();
       LOG.info("********* Started Services **********");
 
-      if (!Configuration.AMBARISERVER_METRICS_DISABLE.equals(true)) {
+      if (!configs.isMetricsServiceDisabled()) {
         metricsService.start();
       } else {
         LOG.info("AmbariServer Metrics disabled.");


Mime
View raw message