hadoop-yarn-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hitesh Shah (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (YARN-1666) Make admin refreshNodes work across RM failover
Date Mon, 24 Feb 2014 21:39:26 GMT

    [ https://issues.apache.org/jira/browse/YARN-1666?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13910849#comment-13910849
] 

Hitesh Shah commented on YARN-1666:
-----------------------------------

{code}
-    if (!(this.configurationProvider instanceof LocalConfigurationProvider)) {
-      // load yarn-site.xml
-      this.conf =
-          this.configurationProvider.getConfiguration(this.conf,
-              YarnConfiguration.YARN_SITE_XML_FILE);
-      // load core-site.xml
-      this.conf =
-          this.configurationProvider.getConfiguration(this.conf,
-              YarnConfiguration.CORE_SITE_CONFIGURATION_FILE);
-      // Do refreshUserToGroupsMappings with loaded core-site.xml
-      Groups.getUserToGroupsMappingServiceWithLoadedConfiguration(this.conf)
-          .refresh();
-    }
+
+    // load yarn-site.xml
+    this.conf.addResource(this.configurationProvider
+        .getConfigurationInputStream(this.conf,
+            YarnConfiguration.YARN_SITE_CONFIGURATION_FILE));
+    // load core-site.xml
+    this.conf.addResource(this.configurationProvider
+        .getConfigurationInputStream(this.conf,
+            YarnConfiguration.CORE_SITE_CONFIGURATION_FILE));
+    // Do refreshUserToGroupsMappings with loaded core-site.xml
+    Groups.getUserToGroupsMappingServiceWithLoadedConfiguration(this.conf)
+        .refresh();

{code}


The above code seems to be breaking MiniClusters. Is the expectation now that anyone using
a MiniCluster has to create the appropriate config files and add them into the unit test class
path? 

Stack trace below:

{code}
Exception: null
java.lang.NullPointerException
  at org.apache.hadoop.conf.Configuration$Resource.<init>(Configuration.java:182)
  at org.apache.hadoop.conf.Configuration.addResource(Configuration.java:751)
  at org.apache.hadoop.yarn.server.resourcemanager.ResourceManager.serviceInit(ResourceManager.java:193)
  at org.apache.hadoop.service.AbstractService.init(AbstractService.java:163)
  at org.apache.hadoop.yarn.server.MiniYARNCluster.initResourceManager(MiniYARNCluster.java:268)
  at org.apache.hadoop.yarn.server.MiniYARNCluster.access$400(MiniYARNCluster.java:90)
  at org.apache.hadoop.yarn.server.MiniYARNCluster$ResourceManagerWrapper.serviceInit(MiniYARNCluster.java:419)
{code} 


> Make admin refreshNodes work across RM failover
> -----------------------------------------------
>
>                 Key: YARN-1666
>                 URL: https://issues.apache.org/jira/browse/YARN-1666
>             Project: Hadoop YARN
>          Issue Type: Sub-task
>            Reporter: Xuan Gong
>            Assignee: Xuan Gong
>             Fix For: 2.4.0
>
>         Attachments: YARN-1666.1.patch, YARN-1666.2.patch, YARN-1666.2.patch, YARN-1666.3.patch,
YARN-1666.4.patch, YARN-1666.4.patch, YARN-1666.5.patch, YARN-1666.6.patch
>
>




--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message