Repository: kylin Updated Branches: refs/heads/yang22-hbase1.x 24e0e9aff -> b25e4a77a (forced update)
KYLIN-2474 check lookup table after build snapshot Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/4849c302 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/4849c302 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/4849c302 Branch: refs/heads/yang22-hbase1.x Commit: 4849c3020cad0813674680ae82bea30dc2f6310b Parents: d4dc6ee Author: Li Yang <liy...@apache.org> Authored: Tue Feb 28 16:51:45 2017 +0800 Committer: Yang Li <liy...@apache.org> Committed: Tue Feb 28 21:58:00 2017 +0800 ---------------------------------------------------------------------- .../apache/kylin/cube/cli/DictionaryGeneratorCLI.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/4849c302/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java ---------------------------------------------------------------------- diff --git a/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java b/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java index 3e1ab0d..e70a0f2 100644 --- a/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java +++ b/core-cube/src/main/java/org/apache/kylin/cube/cli/DictionaryGeneratorCLI.java @@ -74,16 +74,27 @@ public class DictionaryGeneratorCLI { // snapshot Set<String> toSnapshot = Sets.newHashSet(); + Set<TableRef> toCheckLookup = Sets.newHashSet(); for (DimensionDesc dim : cubeSeg.getCubeDesc().getDimensions()) { TableRef table = dim.getTableRef(); - if (cubeSeg.getModel().isLookupTable(table)) + if (cubeSeg.getModel().isLookupTable(table)) { toSnapshot.add(table.getTableIdentity()); + toCheckLookup.add(table); + } } for (String tableIdentity : toSnapshot) { logger.info("Building snapshot of " + tableIdentity); cubeMgr.buildSnapshotTable(cubeSeg, tableIdentity); } + + for (DimensionDesc dim : cubeSeg.getCubeDesc().getDimensions()) { + TableRef lookup = dim.getTableRef(); + if (toCheckLookup.contains(lookup)) { + logger.info("Checking snapshot of " + lookup); + cubeMgr.getLookupTable(cubeSeg, dim); + } + } } private static ReadableTable decideInputTable(DataModelDesc model, TblColRef col, DistinctColumnValuesProvider factTableValueProvider) {