|
@@ -641,6 +641,7 @@ public class ResourceManager extends CompositeService
|
|
|
private ResourceManager rm;
|
|
|
private boolean fromActive = false;
|
|
|
private StandByTransitionRunnable standByTransitionRunnable;
|
|
|
+ private RMNMInfo rmnmInfo;
|
|
|
|
|
|
RMActiveServices(ResourceManager rm) {
|
|
|
super("RMActiveServices");
|
|
@@ -845,7 +846,7 @@ public class ResourceManager extends CompositeService
|
|
|
addService(proxyCAManager);
|
|
|
rmContext.setProxyCAManager(proxyCAManager);
|
|
|
|
|
|
- new RMNMInfo(rmContext, scheduler);
|
|
|
+ rmnmInfo = new RMNMInfo(rmContext, scheduler);
|
|
|
|
|
|
if (conf.getBoolean(YarnConfiguration.YARN_API_SERVICES_ENABLE,
|
|
|
false)) {
|
|
@@ -924,6 +925,10 @@ public class ResourceManager extends CompositeService
|
|
|
super.serviceStop();
|
|
|
|
|
|
DefaultMetricsSystem.shutdown();
|
|
|
+ // unregister rmnmInfo bean
|
|
|
+ if (rmnmInfo != null) {
|
|
|
+ rmnmInfo.unregister();
|
|
|
+ }
|
|
|
if (rmContext != null) {
|
|
|
RMStateStore store = rmContext.getStateStore();
|
|
|
try {
|
|
@@ -1182,9 +1187,9 @@ public class ResourceManager extends CompositeService
|
|
|
params.put("com.sun.jersey.config.property.packages", apiPackages);
|
|
|
}
|
|
|
|
|
|
- Builder<ApplicationMasterService> builder =
|
|
|
+ Builder<ResourceManager> builder =
|
|
|
WebApps
|
|
|
- .$for("cluster", ApplicationMasterService.class, masterService,
|
|
|
+ .$for("cluster", ResourceManager.class, this,
|
|
|
"ws")
|
|
|
.with(conf)
|
|
|
.withServlet("API-Service", "/app/*",
|