/** * Method used to start the Node health monitoring. * */ @Override protected void serviceStart() throws Exception { // if health script path is not configured don't start the thread. if (!shouldRun(conf)) { 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. nodeHealthScriptScheduler.scheduleAtFixedRate(timer, 0, intervalTime); super.serviceStart(); }
/** * Method used to start the Node health monitoring. * */ @Override protected void serviceStart() throws Exception { // if health script path is not configured don't start the thread. if (!shouldRun(conf)) { 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. nodeHealthScriptScheduler.scheduleAtFixedRate(timer, 0, intervalTime); super.serviceStart(); }
/** * Method used to terminate the node health monitoring service. * */ @Override protected void serviceStop() { if (!shouldRun(conf)) { return; } if (nodeHealthScriptScheduler != null) { nodeHealthScriptScheduler.cancel(); } if (shexec != null) { Process p = shexec.getProcess(); if (p != null) { p.destroy(); } } }
/** * Method used to terminate the node health monitoring service. * */ @Override protected void serviceStop() { if (!shouldRun(conf)) { return; } if (nodeHealthScriptScheduler != null) { nodeHealthScriptScheduler.cancel(); } if (shexec != null) { Process p = shexec.getProcess(); if (p != null) { p.destroy(); } } }
@Override protected void serviceInit(Configuration conf) throws Exception { if (NodeHealthScriptRunner.shouldRun(conf)) { nodeHealthScriptRunner = new NodeHealthScriptRunner(); addService(nodeHealthScriptRunner); } addService(dirsHandler); super.serviceInit(conf); }
@Override protected void serviceInit(Configuration conf) throws Exception { if (NodeHealthScriptRunner.shouldRun(conf)) { nodeHealthScriptRunner = new NodeHealthScriptRunner(); addService(nodeHealthScriptRunner); } addService(dirsHandler); super.serviceInit(conf); }