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

(cherry picked from commit 1b78b2ba17)
(cherry picked from commit 88556294e2)
This commit is contained in:
Akira Ajisaka 2016-04-11 01:31:49 +09:00
parent 801c95c1cc
commit c748ced474
2 changed files with 4 additions and 1 deletions

View File

@ -124,6 +124,9 @@ Release 2.7.3 - UNRELEASED
YARN-4917. Fix typos in documentation of Capacity Scheduler.
(Takashi Ohnishi via iwasakims)
YARN-4938. MiniYarnCluster should not request transitionToActive to RM
on non-HA environment. (Eric Badger via aajisaka)
Release 2.7.2 - 2016-01-25
INCOMPATIBLE CHANGES

View File

@ -445,7 +445,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));