hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From inigo...@apache.org
Subject [02/14] hadoop git commit: YARN-8399. NodeManager is giving 403 GSS exception post upgrade to 3.1 in secure mode. Contributed by Sunil Govindan.
Date Fri, 08 Jun 2018 00:02:16 GMT
YARN-8399. NodeManager is giving 403 GSS exception post upgrade to 3.1 in secure mode. Contributed
by Sunil Govindan.


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

Branch: refs/heads/HADOOP-15461
Commit: 58bc34f1e347034af566d6968eb3b3439a91cc74
Parents: 9654dd1
Author: Rohith Sharma K S <rohithsharmaks@apache.org>
Authored: Thu Jun 7 10:25:47 2018 +0530
Committer: Rohith Sharma K S <rohithsharmaks@apache.org>
Committed: Thu Jun 7 10:25:56 2018 +0530

----------------------------------------------------------------------
 .../containermanager/AuxServices.java           |  6 +--
 .../containermanager/TestAuxServices.java       | 48 ++++++++++++++++++++
 2 files changed, 51 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/58bc34f1/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
index 3fe3cfd..77c4dd9 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/AuxServices.java
@@ -262,7 +262,7 @@ public class AuxServices extends AbstractService
               }
             }
             s = AuxiliaryServiceWithCustomClassLoader.getInstance(
-                conf, className, dest.toString());
+                new Configuration(conf), className, dest.toString());
           }
           LOG.info("The aux service:" + sName
               + " are using the custom classloader");
@@ -273,7 +273,7 @@ public class AuxServices extends AbstractService
           if (sClass == null) {
             throw new RuntimeException("No class defined for " + sName);
           }
-          s = ReflectionUtils.newInstance(sClass, conf);
+          s = ReflectionUtils.newInstance(sClass, new Configuration(conf));
         }
         if (s == null) {
           throw new RuntimeException("No object created for " + sName);
@@ -294,7 +294,7 @@ public class AuxServices extends AbstractService
           stateStoreFs.mkdirs(storePath, storeDirPerms);
           s.setRecoveryPath(storePath);
         }
-        s.init(conf);
+        s.init(new Configuration(conf));
       } catch (RuntimeException e) {
         LOG.error("Failed to initialize " + sName, e);
         throw e;

http://git-wip-us.apache.org/repos/asf/hadoop/blob/58bc34f1/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestAuxServices.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestAuxServices.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestAuxServices.java
index fcf92b5..ca0b32a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestAuxServices.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/TestAuxServices.java
@@ -678,4 +678,52 @@ public class TestAuxServices {
       super("RecoverableServiceB", "Bsrv");
     }
   }
+
+  static class ConfChangeAuxService extends AuxiliaryService
+      implements Service {
+
+    ConfChangeAuxService() {
+      super("ConfChangeAuxService");
+    }
+
+    @Override
+    protected void serviceInit(Configuration conf) throws Exception {
+      conf.set("dummyConfig", "changedTestValue");
+      super.serviceInit(conf);
+    }
+
+    @Override
+    public void initializeApplication(
+        ApplicationInitializationContext initAppContext) {
+    }
+
+    @Override
+    public void stopApplication(ApplicationTerminationContext stopAppContext) {
+    }
+
+    @Override
+    public ByteBuffer getMetaData() {
+      return null;
+    }
+  }
+
+  @Test
+  public void testAuxServicesConfChange() {
+    Configuration conf = new Configuration();
+    conf.setStrings(YarnConfiguration.NM_AUX_SERVICES,
+        new String[]{"ConfChangeAuxService"});
+    conf.setClass(String.format(YarnConfiguration.NM_AUX_SERVICE_FMT,
+        "ConfChangeAuxService"), ConfChangeAuxService.class, Service.class);
+    AuxServices aux = new AuxServices(MOCK_AUX_PATH_HANDLER, MOCK_CONTEXT,
+        MOCK_DEL_SERVICE);
+    conf.set("dummyConfig", "testValue");
+    aux.init(conf);
+    aux.start();
+    for (AuxiliaryService s : aux.getServices()) {
+      assertEquals(STARTED, s.getServiceState());
+      assertEquals(conf.get("dummyConfig"), "testValue");
+    }
+
+    aux.stop();
+  }
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message