kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject kylin git commit: KYLIN-2169 fix test case
Date Tue, 08 Nov 2016 16:41:13 GMT
Repository: kylin
Updated Branches:
  refs/heads/KYLIN-2006 aea46d7ce -> 248b181ce


KYLIN-2169 fix test case


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

Branch: refs/heads/KYLIN-2006
Commit: 248b181ce5a6f5f43d8a64689aa2233b4a29d869
Parents: aea46d7
Author: Yang Li <liyang@apache.org>
Authored: Wed Nov 9 00:40:47 2016 +0800
Committer: Yang Li <liyang@apache.org>
Committed: Wed Nov 9 00:40:47 2016 +0800

----------------------------------------------------------------------
 .../org/apache/kylin/job/execution/AbstractExecutable.java   | 5 +++--
 .../apache/kylin/job/execution/DefaultChainedExecutable.java | 8 ++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/248b181c/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
----------------------------------------------------------------------
diff --git a/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
b/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
index 9292418..80a92de 100644
--- a/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
+++ b/core-job/src/main/java/org/apache/kylin/job/execution/AbstractExecutable.java
@@ -61,7 +61,7 @@ public abstract class AbstractExecutable implements Executable, Idempotent
{
         setId(UUID.randomUUID().toString());
     }
     
-    void initConfig(KylinConfig config) {
+    protected void initConfig(KylinConfig config) {
         Preconditions.checkState(this.config == null || this.config == config);
         this.config = config;
     }
@@ -201,7 +201,8 @@ public abstract class AbstractExecutable implements Executable, Idempotent
{
 
     @Override
     public final ExecutableState getStatus() {
-        return getManager().getOutput(this.getId()).getState();
+        ExecutableManager manager = getManager();
+        return manager.getOutput(this.getId()).getState();
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/kylin/blob/248b181c/core-job/src/main/java/org/apache/kylin/job/execution/DefaultChainedExecutable.java
----------------------------------------------------------------------
diff --git a/core-job/src/main/java/org/apache/kylin/job/execution/DefaultChainedExecutable.java
b/core-job/src/main/java/org/apache/kylin/job/execution/DefaultChainedExecutable.java
index 7b92608..fccab30 100644
--- a/core-job/src/main/java/org/apache/kylin/job/execution/DefaultChainedExecutable.java
+++ b/core-job/src/main/java/org/apache/kylin/job/execution/DefaultChainedExecutable.java
@@ -21,6 +21,7 @@ package org.apache.kylin.job.execution;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.kylin.common.KylinConfig;
 import org.apache.kylin.job.exception.ExecuteException;
 
 import com.google.common.collect.Lists;
@@ -36,6 +37,13 @@ public class DefaultChainedExecutable extends AbstractExecutable implements
Chai
         super();
     }
 
+    protected void initConfig(KylinConfig config) {
+        super.initConfig(config);
+        for (AbstractExecutable sub : subTasks) {
+            sub.initConfig(config);
+        }
+    }
+    
     @Override
     protected ExecuteResult doWork(ExecutableContext context) throws ExecuteException {
         List<? extends Executable> executables = getTasks();


Mime
View raw message