ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adorosz...@apache.org
Subject [2/3] ambari git commit: AMBARI-20918. AmbariServer Metrics service cannot be disabled
Date Tue, 06 Jun 2017 12:49:55 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/97a51aaf
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/97a51aaf
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/97a51aaf

Branch: refs/heads/branch-2.5
Commit: 97a51aaf924d4d9e385f7e4751d50f4617c609c5
Parents: af0bbce
Author: Attila Doroszlai <adoroszlai@hortonworks.com>
Authored: Wed May 3 14:34:02 2017 +0200
Committer: Attila Doroszlai <adoroszlai@hortonworks.com>
Committed: Tue Jun 6 14:29:42 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/97a51aaf/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 c1cd033..fa5ed71 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
@@ -5095,6 +5095,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/97a51aaf/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 3de2b87..e8c986b 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
@@ -568,7 +568,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