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

This commit is contained in:
Akira Ajisaka 2016-04-11 01:31:49 +09:00
parent ff95fd547b
commit 1b78b2ba17
1 changed files with 1 additions and 1 deletions

View File

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