YARN-3375. NodeHealthScriptRunner.shouldRun() check is performing 3 times for starting NodeHealthScriptRunner (Devaraj K via wangda)
This commit is contained in:
parent
0d6aa5d609
commit
71f4de220c
@ -214,11 +214,6 @@ protected void serviceInit(Configuration conf) throws Exception {
|
||||
*/
|
||||
@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 @@ protected void serviceStart() throws Exception {
|
||||
*/
|
||||
@Override
|
||||
protected void serviceStop() {
|
||||
if (!shouldRun(nodeHealthScript)) {
|
||||
return;
|
||||
}
|
||||
if (nodeHealthScriptScheduler != null) {
|
||||
nodeHealthScriptScheduler.cancel();
|
||||
}
|
||||
|
@ -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
|
||||
|
@ -21,7 +21,6 @@
|
||||
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 NodeHealthCheckerService(NodeHealthScriptRunner scriptRunner,
|
||||
|
||||
@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);
|
||||
|
@ -210,7 +210,9 @@ public static NodeHealthScriptRunner getNodeHealthScriptRunner(Configuration con
|
||||
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(
|
||||
|
Loading…
Reference in New Issue
Block a user