فهرست منبع

YARN-4938. MiniYarnCluster should not request transitionToActive to RM on non-HA environment. Contributed by Eric Badger.

Akira Ajisaka 9 سال پیش
والد
کامیت
1b78b2ba17

+ 1 - 1
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-tests/src/test/java/org/apache/hadoop/yarn/server/MiniYARNCluster.java

@@ -462,7 +462,7 @@ public class MiniYARNCluster extends CompositeService {
     @Override
     protected synchronized void serviceStart() throws Exception {
       startResourceManager(index);
-      if(index == 0) {
+      if(index == 0 && resourceManagers[index].getRMContext().isHAEnabled()) {
         resourceManagers[index].getRMContext().getRMAdminService()
           .transitionToActive(new HAServiceProtocol.StateChangeRequestInfo(
             HAServiceProtocol.RequestSource.REQUEST_BY_USER_FORCED));