hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wan...@apache.org
Subject hadoop git commit: YARN-3375. NodeHealthScriptRunner.shouldRun() check is performing 3 times for starting NodeHealthScriptRunner (Devaraj K via wangda)
Date Mon, 04 May 2015 22:50:55 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 0d6aa5d60 -> 71f4de220


YARN-3375. NodeHealthScriptRunner.shouldRun() check is performing 3 times for starting NodeHealthScriptRunner
(Devaraj K via wangda)


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

Branch: refs/heads/trunk
Commit: 71f4de220c74bf2c90630bd0442979d92380d304
Parents: 0d6aa5d
Author: Wangda Tan <wangda@apache.org>
Authored: Mon May 4 15:49:19 2015 -0700
Committer: Wangda Tan <wangda@apache.org>
Committed: Mon May 4 15:49:19 2015 -0700

----------------------------------------------------------------------
 .../java/org/apache/hadoop/util/NodeHealthScriptRunner.java  | 8 --------
 hadoop-yarn-project/CHANGES.txt                              | 3 +++
 .../yarn/server/nodemanager/NodeHealthCheckerService.java    | 4 +---
 .../apache/hadoop/yarn/server/nodemanager/NodeManager.java   | 4 +++-
 4 files changed, 7 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/71f4de22/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java
b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java
index 568ad5b..fc392c4 100644
--- a/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java
+++ b/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/util/NodeHealthScriptRunner.java
@@ -214,11 +214,6 @@ public class NodeHealthScriptRunner extends AbstractService {
    */
   @Override
   protected void serviceStart() throws Exception {
-    // if health script path is not configured don't start the thread.
-    if (!shouldRun(nodeHealthScript)) {
-      LOG.info("Not starting node health monitor");
-      return;
-    }
     nodeHealthScriptScheduler = new Timer("NodeHealthMonitor-Timer", true);
     // Start the timer task immediately and
     // then periodically at interval time.
@@ -232,9 +227,6 @@ public class NodeHealthScriptRunner extends AbstractService {
    */
   @Override
   protected void serviceStop() {
-    if (!shouldRun(nodeHealthScript)) {
-      return;
-    }
     if (nodeHealthScriptScheduler != null) {
       nodeHealthScriptScheduler.cancel();
     }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/71f4de22/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index 08762e3..09ec41a 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -299,6 +299,9 @@ Release 2.8.0 - UNRELEASED
     YARN-3097. Logging of resource recovery on NM restart has redundancies
     (Eric Payne via jlowe)
 
+    YARN-3375. NodeHealthScriptRunner.shouldRun() check is performing 3 times for 
+    starting NodeHealthScriptRunner. (Devaraj K via wangda)
+
 Release 2.7.1 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/71f4de22/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeHealthCheckerService.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/NodeHealthCheckerService.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeHealthCheckerService.java
index 02b318a..c1a159a 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeHealthCheckerService.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeHealthCheckerService.java
@@ -21,7 +21,6 @@ package org.apache.hadoop.yarn.server.nodemanager;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.service.CompositeService;
 import org.apache.hadoop.util.NodeHealthScriptRunner;
-import org.apache.hadoop.yarn.conf.YarnConfiguration;
 
 /**
  * The class which provides functionality of checking the health of the node and
@@ -44,8 +43,7 @@ public class NodeHealthCheckerService extends CompositeService {
 
   @Override
   protected void serviceInit(Configuration conf) throws Exception {
-    if (NodeHealthScriptRunner.shouldRun(
-        conf.get(YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_PATH))) {
+    if (nodeHealthScriptRunner != null) {
       addService(nodeHealthScriptRunner);
     }
     addService(dirsHandler);

http://git-wip-us.apache.org/repos/asf/hadoop/blob/71f4de22/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.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/NodeManager.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java
index 6718b53..4ac06d0 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeManager.java
@@ -210,7 +210,9 @@ public class NodeManager extends CompositeService
     String nodeHealthScript = 
         conf.get(YarnConfiguration.NM_HEALTH_CHECK_SCRIPT_PATH);
     if(!NodeHealthScriptRunner.shouldRun(nodeHealthScript)) {
-      LOG.info("Abey khali");
+      LOG.info("Node Manager health check script is not available "
+          + "or doesn't have execute permission, so not "
+          + "starting the node health script runner.");
       return null;
     }
     long nmCheckintervalTime = conf.getLong(


Mime
View raw message