You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by li...@apache.org on 2017/12/21 02:58:57 UTC
[12/16] kylin git commit: APACHE-KYLIN-2905: Refine the process of
submitting a job
APACHE-KYLIN-2905: Refine the process of submitting a job
Signed-off-by: lidongsjtu <li...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/58005727
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/58005727
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/58005727
Branch: refs/heads/master
Commit: 58005727ea7f0f9a35a83c737b1a6b9c6b342f6f
Parents: 7ca66d4
Author: Zhong <nj...@apache.org>
Authored: Tue Sep 26 16:57:44 2017 +0800
Committer: lidongsjtu <li...@apache.org>
Committed: Wed Dec 20 23:27:33 2017 +0800
----------------------------------------------------------------------
.../java/org/apache/kylin/job/execution/ExecutableManager.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/58005727/core-job/src/main/java/org/apache/kylin/job/execution/ExecutableManager.java
----------------------------------------------------------------------
diff --git a/core-job/src/main/java/org/apache/kylin/job/execution/ExecutableManager.java b/core-job/src/main/java/org/apache/kylin/job/execution/ExecutableManager.java
index bc38fff..c41c074 100644
--- a/core-job/src/main/java/org/apache/kylin/job/execution/ExecutableManager.java
+++ b/core-job/src/main/java/org/apache/kylin/job/execution/ExecutableManager.java
@@ -109,8 +109,11 @@ public class ExecutableManager {
public void addJob(AbstractExecutable executable) {
try {
executable.initConfig(config);
- executableDao.addJob(parse(executable));
+ if (executableDao.getJob(executable.getId()) != null) {
+ throw new IllegalArgumentException("job id:" + executable.getId() + " already exists");
+ }
addJobOutput(executable);
+ executableDao.addJob(parse(executable));
} catch (PersistentException e) {
logger.error("fail to submit job:" + executable.getId(), e);
throw new RuntimeException(e);