kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billy...@apache.org
Subject kylin git commit: KYLIN-3219
Date Mon, 05 Feb 2018 14:16:27 GMT
Repository: kylin
Updated Branches:
  refs/heads/master d4c8fbcc5 -> d31a00988


KYLIN-3219

Signed-off-by: Billy Liu <billyliu@apache.org>


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

Branch: refs/heads/master
Commit: d31a009887f7d8b849abb560812318533836e5f8
Parents: d4c8fbc
Author: xingpeng1 <xing.peng1@zte.com.cn>
Authored: Thu Feb 1 11:28:46 2018 +0800
Committer: Billy Liu <billyliu@apache.org>
Committed: Mon Feb 5 22:16:07 2018 +0800

----------------------------------------------------------------------
 .../java/org/apache/kylin/engine/mr/CubingJob.java | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/d31a0098/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
index 9173dbd..c9ed359 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/CubingJob.java
@@ -282,10 +282,10 @@ public class CubingJob extends DefaultChainedExecutable {
                     getPerBytesTimeCost(findSourceSizeBytes(), getDuration()));
             if (CubingJobTypeEnum.getByName(getJobType()) == CubingJobTypeEnum.BUILD) {
                 jobStats.setJobStepStats(
-                        getTaskByName(ExecutableConstants.STEP_NAME_FACT_DISTINCT_COLUMNS).getDuration(),
-                        getTaskByName(ExecutableConstants.STEP_NAME_BUILD_DICTIONARY).getDuration(),
-                        getTaskByName(ExecutableConstants.STEP_NAME_BUILD_IN_MEM_CUBE).getDuration(),
-                        getTaskByName(ExecutableConstants.STEP_NAME_CONVERT_CUBOID_TO_HFILE).getDuration());
+                        getTaskDurationByName(ExecutableConstants.STEP_NAME_FACT_DISTINCT_COLUMNS),
+                        getTaskDurationByName(ExecutableConstants.STEP_NAME_BUILD_DICTIONARY),
+                        getTaskDurationByName(ExecutableConstants.STEP_NAME_BUILD_IN_MEM_CUBE),
+                        getTaskDurationByName(ExecutableConstants.STEP_NAME_CONVERT_CUBOID_TO_HFILE));
             }
         } else if (state == ExecutableState.ERROR) {
             jobStats.setJobException(result.getThrowable() != null ? result.getThrowable()
: new Exception());
@@ -293,6 +293,15 @@ public class CubingJob extends DefaultChainedExecutable {
         JobMetricsFacade.updateMetrics(jobStats);
     }
 
+    private long getTaskDurationByName(String name) {
+        AbstractExecutable task = getTaskByName(name);
+        if (task != null) {
+            return task.getDuration();
+        } else {
+            return 0;
+        }
+    }
+
     private static double getPerBytesTimeCost(long size, long timeCost) {
         if (size <= 0) {
             return 0;


Mime
View raw message