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/04/16 11:43:27 UTC

[6/7] kylin git commit: Fix NPE in DistributedScheduler

Fix NPE in DistributedScheduler


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/796d80ff
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/796d80ff
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/796d80ff

Branch: refs/heads/master-KYLIN-2506
Commit: 796d80ff2ca4219709fe594c8581c3218ae4f849
Parents: 875a52e
Author: kangkaisen <ka...@163.com>
Authored: Fri Apr 14 20:10:27 2017 +0800
Committer: Yang Li <li...@apache.org>
Committed: Sun Apr 16 17:12:50 2017 +0800

----------------------------------------------------------------------
 .../apache/kylin/job/impl/threadpool/DistributedScheduler.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/796d80ff/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
----------------------------------------------------------------------
diff --git a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
index b99da7c..c5b03dc 100644
--- a/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
+++ b/core-job/src/main/java/org/apache/kylin/job/impl/threadpool/DistributedScheduler.java
@@ -294,11 +294,11 @@ public class DistributedScheduler implements Scheduler<AbstractExecutable>, Conn
         jobPool = new ThreadPoolExecutor(corePoolSize, corePoolSize, Long.MAX_VALUE, TimeUnit.DAYS, new SynchronousQueue<Runnable>());
         context = new DefaultContext(Maps.<String, Executable> newConcurrentMap(), jobEngineConfig.getConfig());
 
-        resumeAllRunningJobs();
-
         fetcher = new FetcherRunner();
         fetcherPool.scheduleAtFixedRate(fetcher, 10, ExecutableConstants.DEFAULT_SCHEDULER_INTERVAL_SECONDS, TimeUnit.SECONDS);
         hasStarted = true;
+
+        resumeAllRunningJobs();
     }
 
     private void resumeAllRunningJobs() {