You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/05/08 14:02:59 UTC
[08/22] ambari git commit: AMBARI-20918. AmbariServer Metrics service
cannot be disabled
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 <ad...@hortonworks.com>
Authored: Wed May 3 14:34:02 2017 +0200
Committer: Attila Doroszlai <ad...@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.");