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 2016/12/08 03:46:35 UTC
[2/5] kylin git commit: KYLIN-2217 fix NPE in
FactDistinctColumnsReducer
KYLIN-2217 fix NPE in FactDistinctColumnsReducer
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/ac621fea
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/ac621fea
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/ac621fea
Branch: refs/heads/yang22-cdh5.7
Commit: ac621fea49fa220a3d14dc4600bcbd3961e7580f
Parents: ae31b13
Author: Li Yang <li...@apache.org>
Authored: Thu Dec 8 11:14:31 2016 +0800
Committer: Li Yang <li...@apache.org>
Committed: Thu Dec 8 11:15:15 2016 +0800
----------------------------------------------------------------------
.../kylin/engine/mr/steps/FactDistinctColumnsReducer.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kylin/blob/ac621fea/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
----------------------------------------------------------------------
diff --git a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
index a3e61a1..776d750 100644
--- a/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
+++ b/engine-mr/src/main/java/org/apache/kylin/engine/mr/steps/FactDistinctColumnsReducer.java
@@ -117,7 +117,6 @@ public class FactDistinctColumnsReducer extends KylinReducer<SelfDefineSortableK
isPartitionCol = true;
col = cubeDesc.getModel().getPartitionDesc().getPartitionDateColumnRef();
if (col == null) {
- isPartitionCol = false;
logger.info("Do not have partition col. This reducer will keep empty");
}
colValues = Lists.newLinkedList();
@@ -283,9 +282,9 @@ public class FactDistinctColumnsReducer extends KylinReducer<SelfDefineSortableK
cuboidHLLMap, samplingPercentage, mapperNumber, mapperOverlapRatio);
} else if (isPartitionCol) {
// partition col
- if (col == null)
- return;
- outputPartitionInfo(context);
+ if (col != null) {
+ outputPartitionInfo(context);
+ }
} else {
// normal col
if (isReducerLocalBuildDict) {