You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jl...@apache.org on 2016/03/10 00:50:33 UTC

[41/51] [abbrv] ambari git commit: AMBARI-15293. Capture HDFS metrics per RPC port number in AMS and Grafana. Fix for FLUME metrics. (swagle)

AMBARI-15293. Capture HDFS metrics per RPC port number in AMS and Grafana. Fix for FLUME metrics. (swagle)


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

Branch: refs/heads/AMBARI-13364
Commit: cbc3f1a900367d27ed69748cbec31e1b73bb28be
Parents: c0d0741
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Wed Mar 9 13:10:43 2016 -0800
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Wed Mar 9 13:10:43 2016 -0800

----------------------------------------------------------------------
 .../server/api/services/AmbariMetaInfo.java     | 24 +++++++++++---------
 .../2.0.6/hooks/before-START/scripts/params.py  |  4 ++--
 2 files changed, 15 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cbc3f1a9/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
index 2b863d5..4be4049 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
@@ -951,17 +951,19 @@ public class AmbariMetaInfo {
 
   private Map<String, Metric> getAggregateFunctionMetrics(String metricName, Metric currentMetric) {
     Map<String, Metric> newMetrics = new HashMap<String, Metric>();
-    // For every function id
-    for (String identifierToAdd : AGGREGATE_FUNCTION_IDENTIFIERS) {
-      String newMetricKey = metricName + identifierToAdd;
-      Metric newMetric = new Metric(
-        currentMetric.getName() + identifierToAdd,
-        currentMetric.isPointInTime(),
-        currentMetric.isTemporal(),
-        currentMetric.isAmsHostMetric(),
-        currentMetric.getUnit()
-      );
-      newMetrics.put(newMetricKey, newMetric);
+    if (!PropertyHelper.hasAggregateFunctionSuffix(currentMetric.getName())) {
+      // For every function id
+      for (String identifierToAdd : AGGREGATE_FUNCTION_IDENTIFIERS) {
+        String newMetricKey = metricName + identifierToAdd;
+        Metric newMetric = new Metric(
+          currentMetric.getName() + identifierToAdd,
+          currentMetric.isPointInTime(),
+          currentMetric.isTemporal(),
+          currentMetric.isAmsHostMetric(),
+          currentMetric.getUnit()
+        );
+        newMetrics.put(newMetricKey, newMetric);
+      }
     }
 
     return newMetrics;

http://git-wip-us.apache.org/repos/asf/ambari/blob/cbc3f1a9/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
index f6f56df..a19d969 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-START/scripts/params.py
@@ -275,8 +275,8 @@ if namenode_rpc:
  nn_rpc_client_port = namenode_rpc.split(':')[1].strip()
 
 if dfs_ha_enabled:
- dfs_service_rpc_address = default(format('/configurations/hdfs-site/dfs.namenode.servicerpc-address.{namenode_id}'), None)
- dfs_lifeline_rpc_address = default(format('/configurations/hdfs-site/dfs.namenode.lifeline.rpc-address.{namenode_id}'), None)
+ dfs_service_rpc_address = default(format('/configurations/hdfs-site/dfs.namenode.servicerpc-address.{dfs_ha_nameservices}.{namenode_id}'), None)
+ dfs_lifeline_rpc_address = default(format('/configurations/hdfs-site/dfs.namenode.lifeline.rpc-address.{dfs_ha_nameservices}.{namenode_id}'), None)
 else:
  dfs_service_rpc_address = default('/configurations/hdfs-site/dfs.namenode.servicerpc-address', None)
  dfs_lifeline_rpc_address = default(format('/configurations/hdfs-site/dfs.namenode.lifeline.rpc-address'), None)