YARN-4938. MiniYarnCluster should not request transitionToActive to RM on non-HA environment. Contributed by Eric Badger.
This commit is contained in:
parent
ff95fd547b
commit
1b78b2ba17
|
@ -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));
|
||||||
|
|
Loading…
Reference in New Issue