|
@@ -93,7 +93,8 @@ public class NodeManager extends CompositeService
|
|
private AsyncDispatcher dispatcher;
|
|
private AsyncDispatcher dispatcher;
|
|
private ContainerManagerImpl containerManager;
|
|
private ContainerManagerImpl containerManager;
|
|
private NodeStatusUpdater nodeStatusUpdater;
|
|
private NodeStatusUpdater nodeStatusUpdater;
|
|
- private static CompositeServiceShutdownHook nodeManagerShutdownHook;
|
|
|
|
|
|
+ private NodeResourceMonitor nodeResourceMonitor;
|
|
|
|
+ private static CompositeServiceShutdownHook nodeManagerShutdownHook;
|
|
private NMStateStoreService nmStore = null;
|
|
private NMStateStoreService nmStore = null;
|
|
|
|
|
|
private AtomicBoolean isStopping = new AtomicBoolean(false);
|
|
private AtomicBoolean isStopping = new AtomicBoolean(false);
|
|
@@ -292,8 +293,9 @@ public class NodeManager extends CompositeService
|
|
nodeLabelsProvider);
|
|
nodeLabelsProvider);
|
|
}
|
|
}
|
|
|
|
|
|
- NodeResourceMonitor nodeResourceMonitor = createNodeResourceMonitor();
|
|
|
|
|
|
+ nodeResourceMonitor = createNodeResourceMonitor();
|
|
addService(nodeResourceMonitor);
|
|
addService(nodeResourceMonitor);
|
|
|
|
+ ((NMContext) context).setNodeResourceMonitor(nodeResourceMonitor);
|
|
|
|
|
|
containerManager =
|
|
containerManager =
|
|
createContainerManager(context, exec, del, nodeStatusUpdater,
|
|
createContainerManager(context, exec, del, nodeStatusUpdater,
|
|
@@ -413,6 +415,7 @@ public class NodeManager extends CompositeService
|
|
private final NMContainerTokenSecretManager containerTokenSecretManager;
|
|
private final NMContainerTokenSecretManager containerTokenSecretManager;
|
|
private final NMTokenSecretManagerInNM nmTokenSecretManager;
|
|
private final NMTokenSecretManagerInNM nmTokenSecretManager;
|
|
private ContainerManagementProtocol containerManager;
|
|
private ContainerManagementProtocol containerManager;
|
|
|
|
+ private NodeResourceMonitor nodeResourceMonitor;
|
|
private final LocalDirsHandlerService dirsHandler;
|
|
private final LocalDirsHandlerService dirsHandler;
|
|
private final ApplicationACLsManager aclsManager;
|
|
private final ApplicationACLsManager aclsManager;
|
|
private WebServer webServer;
|
|
private WebServer webServer;
|
|
@@ -477,6 +480,15 @@ public class NodeManager extends CompositeService
|
|
return this.nodeHealthStatus;
|
|
return this.nodeHealthStatus;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
+ public NodeResourceMonitor getNodeResourceMonitor() {
|
|
|
|
+ return this.nodeResourceMonitor;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ public void setNodeResourceMonitor(NodeResourceMonitor nodeResourceMonitor) {
|
|
|
|
+ this.nodeResourceMonitor = nodeResourceMonitor;
|
|
|
|
+ }
|
|
|
|
+
|
|
@Override
|
|
@Override
|
|
public ContainerManagementProtocol getContainerManager() {
|
|
public ContainerManagementProtocol getContainerManager() {
|
|
return this.containerManager;
|
|
return this.containerManager;
|