From 3d1fc10ba3146f6eab8d257cb44dccec31d5ae79 Mon Sep 17 00:00:00 2001 From: seki Date: Wed, 29 Mar 2017 19:23:39 +0900 Subject: [PATCH 1/2] insert null check --- .../unit8/job_streamer/control_bus/JobStreamerExecuteJob.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java b/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java index 8256340..d1c3ea7 100644 --- a/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java +++ b/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java @@ -24,6 +24,7 @@ public void execute(JobExecutionContext context) throws JobExecutionException { JobDataMap data = context.getMergedJobDataMap(); String jobName = data.getString("job-name"); String appName = data.getString("app-name"); + if (jobName == null || appName == null) return; logger.info("execute job that " + "jobName:" + jobName + " appName:" + appName + " execution-id:" + data.getString("execution-id") + " command:" + data.getString("command")); Object system = SystemUtil.getSystem(); From 0c2c198b7beb86e797dfb3322dc465aed5f87b17 Mon Sep 17 00:00:00 2001 From: seki Date: Mon, 10 Apr 2017 19:45:48 +0900 Subject: [PATCH 2/2] Add some logs --- .../job_streamer/control_bus/JobStreamerExecuteJob.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java b/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java index d1c3ea7..458ed86 100644 --- a/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java +++ b/src/java/net/unit8/job_streamer/control_bus/JobStreamerExecuteJob.java @@ -24,8 +24,11 @@ public void execute(JobExecutionContext context) throws JobExecutionException { JobDataMap data = context.getMergedJobDataMap(); String jobName = data.getString("job-name"); String appName = data.getString("app-name"); - if (jobName == null || appName == null) return; logger.info("execute job that " + "jobName:" + jobName + " appName:" + appName + " execution-id:" + data.getString("execution-id") + " command:" + data.getString("command")); + if (jobName == null || appName == null) { + logger.warn("not execute invalid job. look back the setting"); + return; + } Object system = SystemUtil.getSystem(); Object jobs = RT.get(system, Keyword.intern("jobs"));