private void stat(Action action) { if (action == null) { return; } switch (action) { case EXECUTE_SUCCESS: stat.incSuccessNum(); break; case EXECUTE_FAILED: stat.incFailedNum(); break; case EXECUTE_LATER: stat.incExeLaterNum(); break; case EXECUTE_EXCEPTION: stat.incExeExceptionNum(); break; } }
@Override protected void afterStart() { if (config.getParameter(ExtConfig.TASK_TRACKER_STOP_WORKING_ENABLE, false)) { appContext.getStopWorkingMonitor().start(); } }
@Override protected void afterStop() { appContext.getMStatReporter().stop(); appContext.getStopWorkingMonitor().stop(); appContext.getRunnerPool().shutDown(); }
@Override protected void beforeStart() { appContext.setMStatReporter(new TaskTrackerMStatReporter(appContext)); appContext.setRemotingClient(remotingClient); // 设置 线程池 appContext.setRunnerPool(new RunnerPool(appContext)); appContext.getMStatReporter().start(); appContext.setJobPullMachine(new JobPullMachine(appContext)); appContext.setStopWorkingMonitor(new StopWorkingMonitor(appContext)); appContext.getHttpCmdServer().registerCommands( new JobTerminateCmd(appContext)); // 终止某个正在执行的任务 }
stat.addRunningTime(time); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Job execute completed : {}, time:{} ms.", jobMeta.getJob(), time); response.setMsg(sw.toString()); long time = SystemClock.now() - startTime; stat.addRunningTime(time); LOGGER.error("Job execute error : {}, time: {}, {}", jobMeta.getJob(), time, t.getMessage(), t); } finally {
private void stat(Action action) { if (action == null) { return; } switch (action) { case EXECUTE_SUCCESS: stat.incSuccessNum(); break; case EXECUTE_FAILED: stat.incFailedNum(); break; case EXECUTE_LATER: stat.incExeLaterNum(); break; case EXECUTE_EXCEPTION: stat.incExeExceptionNum(); break; } }
@Override protected void beforeStart() { appContext.setMStatReporter(new TaskTrackerMStatReporter(appContext)); appContext.setRemotingClient(remotingClient); // 设置 线程池 appContext.setRunnerPool(new RunnerPool(appContext)); appContext.getMStatReporter().start(); appContext.setJobPullMachine(new JobPullMachine(appContext)); appContext.setStopWorkingMonitor(new StopWorkingMonitor(appContext)); appContext.getHttpCmdServer().registerCommands( new JobTerminateCmd(appContext)); // 终止某个正在执行的任务 }
@Override protected void afterStart() { if (config.getParameter(ExtConfig.TASK_TRACKER_STOP_WORKING_ENABLE, false)) { appContext.getStopWorkingMonitor().start(); } }
@Override protected void afterStop() { appContext.getMStatReporter().stop(); appContext.getStopWorkingMonitor().stop(); appContext.getRunnerPool().shutDown(); }
stat.addRunningTime(time); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Job execute completed : {}, time:{} ms.", jobMeta.getJob(), time); response.setMsg(sw.toString()); long time = SystemClock.now() - startTime; stat.addRunningTime(time); LOGGER.error("Job execute error : {}, time: {}, {}", jobMeta.getJob(), time, t.getMessage(), t); } finally {
private void stat(Action action) { if (action == null) { return; } switch (action) { case EXECUTE_SUCCESS: stat.incSuccessNum(); break; case EXECUTE_FAILED: stat.incFailedNum(); break; case EXECUTE_LATER: stat.incExeLaterNum(); break; case EXECUTE_EXCEPTION: stat.incExeExceptionNum(); break; } }
@Override protected void beforeStart() { appContext.setMStatReporter(new TaskTrackerMStatReporter(appContext)); appContext.setRemotingClient(remotingClient); // 设置 线程池 appContext.setRunnerPool(new RunnerPool(appContext)); appContext.getMStatReporter().start(); appContext.setJobPullMachine(new JobPullMachine(appContext)); appContext.setStopWorkingMonitor(new StopWorkingMonitor(appContext)); appContext.getHttpCmdServer().registerCommands( new JobTerminateCmd(appContext)); // 终止某个正在执行的任务 }
@Override protected void afterStart() { if (config.getParameter(ExtConfig.TASK_TRACKER_STOP_WORKING_ENABLE, false)) { appContext.getStopWorkingMonitor().start(); } }
@Override protected void afterStop() { appContext.getMStatReporter().stop(); appContext.getStopWorkingMonitor().stop(); appContext.getRunnerPool().shutDown(); }
stat.addRunningTime(time); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Job execute completed : {}, time:{} ms.", jobMeta.getJob(), time); response.setMsg(sw.toString()); long time = SystemClock.now() - startTime; stat.addRunningTime(time); LOGGER.error("Job execute error : {}, time: {}, {}", jobMeta.getJob(), time, t.getMessage(), t); } finally {