You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2016/03/09 22:08:41 UTC
ambari git commit: AMBARI-15293. Capture HDFS metrics per RPC port
number in AMS and Grafana. Fix for FLUME metrics. (swagle)
Repository: ambari
Updated Branches:
refs/heads/branch-2.2 4051f690b -> 16907f6e5
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/16907f6e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/16907f6e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/16907f6e
Branch: refs/heads/branch-2.2
Commit: 16907f6e567d791da127a5fc50bc006666c0c21d
Parents: 4051f69
Author: Siddharth Wagle <sw...@hortonworks.com>
Authored: Wed Mar 9 13:04:48 2016 -0800
Committer: Siddharth Wagle <sw...@hortonworks.com>
Committed: Wed Mar 9 13:06:41 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/16907f6e/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 b242097..4b15b80 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
@@ -950,17 +950,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/16907f6e/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 ff60227..7a023cf 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
@@ -255,8 +255,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)