This is an automated email from the ASF dual-hosted git repository. nic pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push: new 7b35761 KYLIN-4121 Cleanup hive view intermediate tables after job be finished 7b35761 is described below commit 7b3576124bd4a155d8b86f66f6b1ac612570f97d Author: rupengwang <wangrup...@live.cn> AuthorDate: Thu Aug 1 17:36:24 2019 +0800 KYLIN-4121 Cleanup hive view intermediate tables after job be finished --- .../java/org/apache/kylin/source/hive/GarbageCollectionStep.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/source-hive/src/main/java/org/apache/kylin/source/hive/GarbageCollectionStep.java b/source-hive/src/main/java/org/apache/kylin/source/hive/GarbageCollectionStep.java index ba7c77a..338d566 100644 --- a/source-hive/src/main/java/org/apache/kylin/source/hive/GarbageCollectionStep.java +++ b/source-hive/src/main/java/org/apache/kylin/source/hive/GarbageCollectionStep.java @@ -46,8 +46,6 @@ public class GarbageCollectionStep extends AbstractExecutable { StringBuffer output = new StringBuffer(); try { output.append(cleanUpIntermediateFlatTable(config)); - // don't drop view to avoid concurrent issue - //output.append(cleanUpHiveViewIntermediateTable(config)); } catch (IOException e) { logger.error("job:" + getId() + " execute finished with exception", e); return ExecuteResult.createError(e); @@ -56,6 +54,7 @@ public class GarbageCollectionStep extends AbstractExecutable { return new ExecuteResult(ExecuteResult.State.SUCCEED, output.toString()); } + //clean up both hive intermediate flat table and view table private String cleanUpIntermediateFlatTable(KylinConfig config) throws IOException { StringBuffer output = new StringBuffer(); final HiveCmdBuilder hiveCmdBuilder = new HiveCmdBuilder(); @@ -92,9 +91,11 @@ public class GarbageCollectionStep extends AbstractExecutable { setParam("oldHiveTables", StringUtil.join(tableIdentity, ",")); } + //get intermediate fact table and lookup table(if exists) private List<String> getIntermediateTables() { List<String> intermediateTables = Lists.newArrayList(); - String[] tables = StringUtil.splitAndTrim(getParam("oldHiveTables"), ","); + final String hiveTables = getParam("oldHiveTables") + "," + getParam("oldHiveViewIntermediateTables"); + String[] tables = StringUtil.splitAndTrim(hiveTables, ","); for (String t : tables) { intermediateTables.add(t); }