YARN-6827. [ATS1/1.5] NPE exception while publishing recovering applications into ATS during RM restart. Contributed by Rohith Sharma K S.

(cherry picked from commit 7d06806dfd)
This commit is contained in:
Sunil G 2018-04-20 00:05:53 +05:30
parent aa64def228
commit 162db6e826
1 changed files with 5 additions and 2 deletions

View File

@ -1273,8 +1273,6 @@ public class ResourceManager extends CompositeService implements Recoverable {
protected void serviceStart() throws Exception { protected void serviceStart() throws Exception {
if (this.rmContext.isHAEnabled()) { if (this.rmContext.isHAEnabled()) {
transitionToStandby(false); transitionToStandby(false);
} else {
transitionToActive();
} }
startWepApp(); startWepApp();
@ -1284,6 +1282,11 @@ public class ResourceManager extends CompositeService implements Recoverable {
WebAppUtils.setRMWebAppPort(conf, port); WebAppUtils.setRMWebAppPort(conf, port);
} }
super.serviceStart(); super.serviceStart();
// Non HA case, start after RM services are started.
if (!this.rmContext.isHAEnabled()) {
transitionToActive();
}
} }
protected void doSecureLogin() throws IOException { protected void doSecureLogin() throws IOException {