You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ga...@apache.org on 2017/02/28 12:06:54 UTC
kylin git commit: KYLIN-2457 Should copy the latest dictionaries on
dimension tables in a batch merge job
Repository: kylin
Updated Branches:
refs/heads/master cda4df410 -> a8001226b
KYLIN-2457 Should copy the latest dictionaries on dimension tables in a batch merge job
Signed-off-by: gaodayue <ga...@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
Commit: a8001226b2a07cd553e680b7e14de9bf8c9981f3
Parents: cda4df4
Author: zhengdong <zh...@outlook.com>
Authored: Tue Feb 21 19:56:48 2017 +0800
Committer: gaodayue <ga...@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