ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject ambari git commit: AMBARI-16642. After enabling HTTPS for YARN, NodeManager JVM Metrics on YARN Heatmaps show NA. (Qin Liu via swagle)
Date Mon, 23 May 2016 15:54:18 GMT
Repository: ambari
Updated Branches:
  refs/heads/trunk 79a8cb9d7 -> 3862519d1


AMBARI-16642. After enabling HTTPS for YARN, NodeManager JVM Metrics on YARN Heatmaps show
NA. (Qin Liu via swagle)


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

Branch: refs/heads/trunk
Commit: 3862519d11f5a9cd2b98170f0385b623bebd6a0f
Parents: 79a8cb9
Author: Siddharth Wagle <swagle@hortonworks.com>
Authored: Mon May 23 08:54:10 2016 -0700
Committer: Siddharth Wagle <swagle@hortonworks.com>
Committed: Mon May 23 08:54:10 2016 -0700

----------------------------------------------------------------------
 .../controller/internal/AbstractProviderModule.java       |  7 ++++++-
 .../server/controller/internal/JMXHostProviderTest.java   | 10 +++++++++-
 2 files changed, 15 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/3862519d/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 36be39e..30ce19a 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
@@ -147,6 +147,7 @@ public abstract class AbstractProviderModule implements ProviderModule,
     initPropMap.put("RESOURCEMANAGER", new String[]{"yarn.resourcemanager.webapp.address"});
     initPropMap.put("RESOURCEMANAGER-HTTPS", new String[]{"yarn.resourcemanager.webapp.https.address"});
     initPropMap.put("NODEMANAGER", new String[]{"yarn.nodemanager.webapp.address"});
+    initPropMap.put("NODEMANAGER-HTTPS", new String[]{"yarn.nodemanager.webapp.https.address"});
     serviceDesiredProperties.put(Service.Type.YARN, initPropMap);
 
     initPropMap = new HashMap<String, String[]>();
@@ -165,6 +166,10 @@ public abstract class AbstractProviderModule implements ProviderModule,
     initPropMap = new HashMap<String, String[]>();
     initPropMap.put("RESOURCEMANAGER", new String[]{"yarn.http.policy"});
     jmxDesiredProperties.put("RESOURCEMANAGER", initPropMap);
+
+    initPropMap = new HashMap<String, String[]>();
+    initPropMap.put("NODEMANAGER", new String[]{"yarn.http.policy"});
+    jmxDesiredProperties.put("NODEMANAGER", initPropMap);
     
     initPropMap = new HashMap<String, String[]>();
     initPropMap.put("HISTORYSERVER", new String[]{"mapreduce.jobhistory.http.policy"});
@@ -1159,7 +1164,7 @@ public abstract class AbstractProviderModule implements ProviderModule,
     String jmxProtocolString = clusterJmxProtocolMap.get(clusterName);
 
     try {
-      if (componentName.equals("NAMENODE") || componentName.equals("RESOURCEMANAGER") ||
componentName.equals("JOURNALNODE") || componentName.equals("HISTORYSERVER")) {
+      if (componentName.equals("NAMENODE") || componentName.equals("RESOURCEMANAGER") ||
componentName.equals("NODEMANAGER") || componentName.equals("JOURNALNODE") || componentName.equals("HISTORYSERVER"))
{
         Service.Type service = componentServiceMap.get(componentName);
         String config = serviceConfigTypes.get(service);
         String newSiteConfigVersion = getDesiredConfigVersion(clusterName, config);

http://git-wip-us.apache.org/repos/asf/ambari/blob/3862519d/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 a6e5501..8ef6f0c 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
@@ -75,6 +75,7 @@ public class JMXHostProviderTest {
   private static final String RESOURCEMANAGER_HTTPS_PORT = "yarn.resourcemanager.webapp.https.address";
   private static final String YARN_HTTPS_POLICY = "yarn.http.policy";
   private static final String NODEMANAGER_PORT = "yarn.nodemanager.webapp.address";
+  private static final String NODEMANAGER_HTTPS_PORT = "yarn.nodemanager.webapp.https.address";
   private static final String JOURNALNODE_HTTPS_PORT = "dfs.journalnode.https-address";
   private static final String HDFS_HTTPS_POLICY = "dfs.http.policy";
   private static final String MAPREDUCE_HTTPS_POLICY = "mapreduce.jobhistory.http.policy";
@@ -237,6 +238,7 @@ public class JMXHostProviderTest {
     String componentName4 = "RESOURCEMANAGER";
     String componentName5 = "JOURNALNODE";
     String componentName6 = "HISTORYSERVER";
+    String componentName7 = "NODEMANAGER";
 
     createServiceComponent(clusterName, serviceName, componentName1,
       State.INIT);
@@ -250,6 +252,8 @@ public class JMXHostProviderTest {
         State.INIT);
     createServiceComponent(clusterName, serviceName3, componentName6,
         State.INIT);
+    createServiceComponent(clusterName, serviceName2, componentName7,
+      State.INIT);
 
     String host1 = "h1";
     clusters.addHost(host1);
@@ -286,6 +290,8 @@ public class JMXHostProviderTest {
       host2, null);
     createServiceComponentHost(clusterName, serviceName3, componentName6,
       host2, null);
+    createServiceComponentHost(clusterName, serviceName2, componentName7,
+      host2, null);
 
     // Create configs
     Map<String, String> configs = new HashMap<String, String>();
@@ -299,6 +305,7 @@ public class JMXHostProviderTest {
     yarnConfigs.put(RESOURCEMANAGER_PORT, "8088");
     yarnConfigs.put(NODEMANAGER_PORT, "8042");
     yarnConfigs.put(RESOURCEMANAGER_HTTPS_PORT, "8090");
+    yarnConfigs.put(NODEMANAGER_HTTPS_PORT, "8044");
     yarnConfigs.put(YARN_HTTPS_POLICY, "HTTPS_ONLY");
     
     Map<String, String> mapreduceConfigs = new HashMap<String, String>();
@@ -518,7 +525,8 @@ public class JMXHostProviderTest {
     providerModule.registerResourceProvider(Resource.Type.Configuration);
     Assert.assertEquals("https", providerModule.getJMXProtocol("c1", "RESOURCEMANAGER"));
     Assert.assertEquals("8090", providerModule.getPort("c1", "RESOURCEMANAGER", "localhost",
true));
-
+    Assert.assertEquals("https", providerModule.getJMXProtocol("c1", "NODEMANAGER"));
+    Assert.assertEquals("8044", providerModule.getPort("c1", "NODEMANAGER", "localhost",
true));
   }
   
   @Test


Mime
View raw message