YARN-4057. If ContainersMonitor is not enabled, only print related log info one time. Contributed by Jun Gong.
(cherry picked from commit 14215c8ef8
)
This commit is contained in:
parent
8f2eb99d71
commit
051a622b57
|
@ -349,6 +349,9 @@ Release 2.8.0 - UNRELEASED
|
||||||
YARN-4031. Add JvmPauseMonitor to ApplicationHistoryServer and
|
YARN-4031. Add JvmPauseMonitor to ApplicationHistoryServer and
|
||||||
WebAppProxyServer (djp via rkanter)
|
WebAppProxyServer (djp via rkanter)
|
||||||
|
|
||||||
|
YARN-4057. If ContainersMonitor is not enabled, only print
|
||||||
|
related log info one time. (Jun Gong via zxu)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
YARN-3339. TestDockerContainerExecutor should pull a single image and not
|
YARN-3339. TestDockerContainerExecutor should pull a single image and not
|
||||||
|
|
|
@ -73,6 +73,7 @@ public class ContainersMonitorImpl extends AbstractService implements
|
||||||
|
|
||||||
private boolean pmemCheckEnabled;
|
private boolean pmemCheckEnabled;
|
||||||
private boolean vmemCheckEnabled;
|
private boolean vmemCheckEnabled;
|
||||||
|
private boolean containersMonitorEnabled;
|
||||||
|
|
||||||
private long maxVCoresAllottedForContainers;
|
private long maxVCoresAllottedForContainers;
|
||||||
|
|
||||||
|
@ -153,6 +154,9 @@ public class ContainersMonitorImpl extends AbstractService implements
|
||||||
LOG.info("Physical memory check enabled: " + pmemCheckEnabled);
|
LOG.info("Physical memory check enabled: " + pmemCheckEnabled);
|
||||||
LOG.info("Virtual memory check enabled: " + vmemCheckEnabled);
|
LOG.info("Virtual memory check enabled: " + vmemCheckEnabled);
|
||||||
|
|
||||||
|
containersMonitorEnabled = isEnabled();
|
||||||
|
LOG.info("ContainersMonitor enabled: " + containersMonitorEnabled);
|
||||||
|
|
||||||
nodeCpuPercentageForYARN =
|
nodeCpuPercentageForYARN =
|
||||||
NodeManagerHardwareUtils.getNodeCpuPercentage(conf);
|
NodeManagerHardwareUtils.getNodeCpuPercentage(conf);
|
||||||
|
|
||||||
|
@ -205,7 +209,7 @@ public class ContainersMonitorImpl extends AbstractService implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void serviceStart() throws Exception {
|
protected void serviceStart() throws Exception {
|
||||||
if (this.isEnabled()) {
|
if (containersMonitorEnabled) {
|
||||||
this.monitoringThread.start();
|
this.monitoringThread.start();
|
||||||
}
|
}
|
||||||
super.serviceStart();
|
super.serviceStart();
|
||||||
|
@ -213,7 +217,7 @@ public class ContainersMonitorImpl extends AbstractService implements
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void serviceStop() throws Exception {
|
protected void serviceStop() throws Exception {
|
||||||
if (this.isEnabled()) {
|
if (containersMonitorEnabled) {
|
||||||
this.monitoringThread.interrupt();
|
this.monitoringThread.interrupt();
|
||||||
try {
|
try {
|
||||||
this.monitoringThread.join();
|
this.monitoringThread.join();
|
||||||
|
@ -648,7 +652,7 @@ public class ContainersMonitorImpl extends AbstractService implements
|
||||||
@Override
|
@Override
|
||||||
public void handle(ContainersMonitorEvent monitoringEvent) {
|
public void handle(ContainersMonitorEvent monitoringEvent) {
|
||||||
|
|
||||||
if (!isEnabled()) {
|
if (!containersMonitorEnabled) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue