hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject [14/30] hadoop git commit: YARN-4057. If ContainersMonitor is not enabled, only print related log info one time. Contributed by Jun Gong.
Date Wed, 19 Aug 2015 22:01:37 GMT
YARN-4057. If ContainersMonitor is not enabled, only print related log info one time. Contributed
by Jun Gong.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/14215c8e
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/14215c8e
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/14215c8e

Branch: refs/heads/YARN-1197
Commit: 14215c8ef83d58b8443c52a3cb93e6d44fc87065
Parents: 3a76a01
Author: Zhihai Xu <zxu@apache.org>
Authored: Tue Aug 18 11:36:02 2015 -0700
Committer: Zhihai Xu <zxu@apache.org>
Committed: Tue Aug 18 11:36:02 2015 -0700

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                           |  3 +++
 .../containermanager/monitor/ContainersMonitorImpl.java   | 10 +++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/14215c8e/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index d900617..707300a 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -404,6 +404,9 @@ Release 2.8.0 - UNRELEASED
    YARN-4031. Add JvmPauseMonitor to ApplicationHistoryServer and
    WebAppProxyServer (djp via rkanter)
 
+    YARN-4057. If ContainersMonitor is not enabled, only print
+    related log info one time. (Jun Gong via zxu)
+
   OPTIMIZATIONS
 
     YARN-3339. TestDockerContainerExecutor should pull a single image and not

http://git-wip-us.apache.org/repos/asf/hadoop/blob/14215c8e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
index 89dc980..afb51ad 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/ContainersMonitorImpl.java
@@ -73,6 +73,7 @@ public class ContainersMonitorImpl extends AbstractService implements
 
   private boolean pmemCheckEnabled;
   private boolean vmemCheckEnabled;
+  private boolean containersMonitorEnabled;
 
   private long maxVCoresAllottedForContainers;
 
@@ -153,6 +154,9 @@ public class ContainersMonitorImpl extends AbstractService implements
     LOG.info("Physical memory check enabled: " + pmemCheckEnabled);
     LOG.info("Virtual memory check enabled: " + vmemCheckEnabled);
 
+    containersMonitorEnabled = isEnabled();
+    LOG.info("ContainersMonitor enabled: " + containersMonitorEnabled);
+
     nodeCpuPercentageForYARN =
         NodeManagerHardwareUtils.getNodeCpuPercentage(conf);
 
@@ -205,7 +209,7 @@ public class ContainersMonitorImpl extends AbstractService implements
 
   @Override
   protected void serviceStart() throws Exception {
-    if (this.isEnabled()) {
+    if (containersMonitorEnabled) {
       this.monitoringThread.start();
     }
     super.serviceStart();
@@ -213,7 +217,7 @@ public class ContainersMonitorImpl extends AbstractService implements
 
   @Override
   protected void serviceStop() throws Exception {
-    if (this.isEnabled()) {
+    if (containersMonitorEnabled) {
       this.monitoringThread.interrupt();
       try {
         this.monitoringThread.join();
@@ -648,7 +652,7 @@ public class ContainersMonitorImpl extends AbstractService implements
   @Override
   public void handle(ContainersMonitorEvent monitoringEvent) {
 
-    if (!isEnabled()) {
+    if (!containersMonitorEnabled) {
       return;
     }
 


Mime
View raw message