You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by ni...@apache.org on 2019/08/02 12:32:28 UTC

[kylin] branch master updated: Revert "KYLIN-4121 Cleanup hive view intermediate tables after job be finished"

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 c39ba7f  Revert "KYLIN-4121 Cleanup hive view intermediate tables after job be finished"
c39ba7f is described below

commit c39ba7f403c91af3b8e799e498d10b2280db330d
Author: nichunen <ni...@apache.org>
AuthorDate: Fri Aug 2 20:31:37 2019 +0800

    Revert "KYLIN-4121 Cleanup hive view intermediate tables after job be finished"
    
    This reverts commit 7b3576124bd4a155d8b86f66f6b1ac612570f97d.
---
 .../java/org/apache/kylin/source/hive/GarbageCollectionStep.java   | 7 +++----
 1 file changed, 3 insertions(+), 4 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 338d566..ba7c77a 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,6 +46,8 @@ 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);
@@ -54,7 +56,6 @@ 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();
@@ -91,11 +92,9 @@ 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();
-        final String hiveTables = getParam("oldHiveTables") + "," + getParam("oldHiveViewIntermediateTables");
-        String[] tables = StringUtil.splitAndTrim(hiveTables, ",");
+        String[] tables = StringUtil.splitAndTrim(getParam("oldHiveTables"), ",");
         for (String t : tables) {
             intermediateTables.add(t);
         }