You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ds...@apache.org on 2014/04/07 21:38:56 UTC
git commit: AMBARI-5376 jmx NODEMANAGER metrics dont display when we
customize NODEMANAGER port (dsen)
Repository: ambari
Updated Branches:
refs/heads/trunk eab916dd2 -> 322d10de9
AMBARI-5376 jmx NODEMANAGER metrics dont display when we customize NODEMANAGER port (dsen)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/322d10de
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/322d10de
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/322d10de
Branch: refs/heads/trunk
Commit: 322d10de9265e1d39b7e86d5fb6f507c8145c51f
Parents: eab916d
Author: Dmitry Sen <ds...@hortonworks.com>
Authored: Mon Apr 7 22:38:45 2014 +0300
Committer: Dmitry Sen <ds...@hortonworks.com>
Committed: Mon Apr 7 22:38:45 2014 +0300
----------------------------------------------------------------------
.../controller/internal/AbstractProviderModule.java | 10 +++++++++-
.../main/java/org/apache/ambari/server/state/Service.java | 3 ++-
.../server/controller/internal/JMXHostProviderTest.java | 4 ++++
3 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/322d10de/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
index ced22b1..b9f48dd 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/AbstractProviderModule.java
@@ -81,6 +81,7 @@ public abstract class AbstractProviderModule implements ProviderModule, Resource
serviceConfigTypes.put(Service.Type.MAPREDUCE, "mapred-site");
serviceConfigTypes.put(Service.Type.HBASE, "hbase-site");
serviceConfigTypes.put(Service.Type.YARN, "yarn-site");
+ serviceConfigTypes.put(Service.Type.MAPREDUCE2, "mapred-site");
componentServiceMap.put("NAMENODE", Service.Type.HDFS);
componentServiceMap.put("DATANODE", Service.Type.HDFS);
@@ -88,6 +89,8 @@ public abstract class AbstractProviderModule implements ProviderModule, Resource
componentServiceMap.put("TASKTRACKER", Service.Type.MAPREDUCE);
componentServiceMap.put("HBASE_MASTER", Service.Type.HBASE);
componentServiceMap.put("RESOURCEMANAGER", Service.Type.YARN);
+ componentServiceMap.put("NODEMANAGER", Service.Type.YARN);
+ componentServiceMap.put("HISTORYSERVER", Service.Type.MAPREDUCE2);
Map<String, String[]> initPropMap = new HashMap<String, String[]>();
initPropMap.put("NAMENODE", new String[] {"dfs.http.address", "dfs.namenode.http-address"});
@@ -105,8 +108,13 @@ public abstract class AbstractProviderModule implements ProviderModule, Resource
initPropMap = new HashMap<String, String[]>();
initPropMap.put("RESOURCEMANAGER", new String[] {"yarn.resourcemanager.webapp.address"});
+ initPropMap.put("NODEMANAGER", new String[] {"yarn.nodemanager.webapp.address"});
serviceDesiredProperties.put(Service.Type.YARN, initPropMap);
-
+
+ initPropMap = new HashMap<String, String[]>();
+ initPropMap.put("HISTORYSERVER", new String[] {"mapreduce.jobhistory.webapp.address"});
+ serviceDesiredProperties.put(Service.Type.MAPREDUCE2, initPropMap);
+
initPropMap = new HashMap<String, String[]>();
initPropMap.put("NAMENODE", new String[] {"hadoop.ssl.enabled"});
jmxDesiredProperties.put("NAMENODE", initPropMap);
http://git-wip-us.apache.org/repos/asf/ambari/blob/322d10de/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java b/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
index 8701ff1..48fd77e 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/state/Service.java
@@ -115,6 +115,7 @@ public interface Service {
PIG,
HCATALOG,
FLUME,
- YARN
+ YARN,
+ MAPREDUCE2
}
}
http://git-wip-us.apache.org/repos/asf/ambari/blob/322d10de/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
index 412b066..8aeb111 100644
--- a/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
+++ b/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/JMXHostProviderTest.java
@@ -62,6 +62,7 @@ public class JMXHostProviderTest {
private static final String NAMENODE_PORT_V2 = "dfs.namenode.http-address";
private static final String DATANODE_PORT = "dfs.datanode.http.address";
private static final String RESOURCEMANAGER_PORT = "yarn.resourcemanager.webapp.address";
+ private static final String NODEMANAGER_PORT = "yarn.nodemanager.webapp.address";
@Before
public void setup() throws Exception {
@@ -245,6 +246,7 @@ public class JMXHostProviderTest {
Map<String, String> yarnConfigs = new HashMap<String, String>();
yarnConfigs.put(RESOURCEMANAGER_PORT, "8088");
+ yarnConfigs.put(NODEMANAGER_PORT, "8042");
ConfigurationRequest cr1 = new ConfigurationRequest(clusterName,
"hdfs-site", "versionN", configs);
@@ -344,6 +346,7 @@ public class JMXHostProviderTest {
Map<String, String> yarnConfigs = new HashMap<String, String>();
yarnConfigs.put(RESOURCEMANAGER_PORT, "localhost:50030");
+ yarnConfigs.put(NODEMANAGER_PORT, "localhost:11111");
ConfigurationRequest cr2 = new ConfigurationRequest("c1",
"yarn-site", "versionN+1", yarnConfigs);
@@ -351,6 +354,7 @@ public class JMXHostProviderTest {
crReq.setDesiredConfig(cr2);
controller.updateClusters(Collections.singleton(crReq), null);
Assert.assertEquals("50030", providerModule.getPort("c1", "RESOURCEMANAGER"));
+ Assert.assertEquals("11111", providerModule.getPort("c1", "NODEMANAGER"));
//Unrelated ports
Assert.assertEquals("70070", providerModule.getPort("c1", "NAMENODE"));