kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From liy...@apache.org
Subject [09/48] kylin git commit: KYLIN-2457 Should copy the latest dictionaries on dimension tables in a batch merge job
Date Sun, 12 Mar 2017 11:48:41 GMT
KYLIN-2457 Should copy the latest dictionaries on dimension tables in a batch merge job

Signed-off-by: gaodayue <gaodayue@meituan.com>


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

Branch: refs/heads/master-hbase0.98
Commit: a8001226b2a07cd553e680b7e14de9bf8c9981f3
Parents: cda4df4
Author: zhengdong <zhengd@outlook.com>
Authored: Tue Feb 21 19:56:48 2017 +0800
Committer: gaodayue <gaodayue@meituan.com>
Committed: Tue Feb 28 20:03:55 2017 +0800

----------------------------------------------------------------------
 .../kylin/engine/mr/steps/MergeDictionaryStep.java  | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/a8001226/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/MergeDictionaryStep.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/MergeDictionaryStep.java
b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/MergeDictionaryStep.java
old mode 100644
new mode 100755
index 2281612..4ca132c
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/MergeDictionaryStep.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/MergeDictionaryStep.java
@@ -95,9 +95,9 @@ public class MergeDictionaryStep extends AbstractExecutable {
     /**
      * For the new segment, we need to create dictionaries for it, too. For
      * those dictionaries on fact table, create it by merging underlying
-     * dictionaries For those dictionaries on lookup table, just copy it from
-     * any one of the merging segments, it's guaranteed to be consistent(checked
-     * in CubeSegmentValidator)
+     * dictionaries. For those dictionaries on lookup table, just copy them from
+     * the latest one of the merging segments( https://issues.apache.org/jira/browse/KYLIN-2457),
+     * which is reasonable under the assumption that lookup tables would be either static
or incremental.
      *
      * @param cube
      * @param newSeg
@@ -135,9 +135,9 @@ public class MergeDictionaryStep extends AbstractExecutable {
             }
             mergeDictionaries(dictMgr, newSeg, dictInfos, col);
         }
-
+        CubeSegment lastSeg = mergingSegments.get(mergingSegments.size() - 1);
         for (TblColRef col : colsNeedCopyDict) {
-            String path = mergingSegments.get(0).getDictResPath(col);
+            String path = lastSeg.getDictResPath(col);
             newSeg.putDictResPath(col, path);
         }
     }
@@ -151,9 +151,9 @@ public class MergeDictionaryStep extends AbstractExecutable {
     }
 
     /**
-     * make snapshots for the new segment by copying from one of the underlying
-     * merging segments. it's guaranteed to be consistent(checked in
-     * CubeSegmentValidator)
+     * make snapshots for the new segment by copying from the latest one of the underlying
+     * merging segments. It's guaranteed to be consistent under the assumption that lookup
tables
+     * would be either static or incremental.
      *
      * @param cube
      * @param newSeg


Mime
View raw message