Repository: kylin
Updated Branches:
  refs/heads/yang21-cdh5.7 9ae4376ae -> 97d675de6 (forced update)


refine StorageCleanupJob


Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/de9f3ad0
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/de9f3ad0
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/de9f3ad0

Branch: refs/heads/yang21-cdh5.7
Commit: de9f3ad0a49ec145ec4166bd1938d8855f425e7b
Parents: 01d68fa
Author: Hongbin Ma <mahong...@apache.org>
Authored: Tue Nov 1 13:31:04 2016 +0800
Committer: Hongbin Ma <mahong...@apache.org>
Committed: Tue Nov 1 13:31:04 2016 +0800

----------------------------------------------------------------------
 .../kylin/storage/hbase/util/StorageCleanupJob.java       | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kylin/blob/de9f3ad0/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java
----------------------------------------------------------------------
diff --git 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java
 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java
index dffce36..c91de7b 100644
--- 
a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java
+++ 
b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/StorageCleanupJob.java
@@ -267,16 +267,21 @@ public class StorageCleanupJob extends 
AbstractApplication {
         List<String> allHiveTablesNeedToBeDeleted = new ArrayList<String>();
         List<String> workingJobList = new ArrayList<String>();
 
+        StringBuilder sb = new StringBuilder();
         for (String jobId : allJobs) {
             // only remove FINISHED and DISCARDED job intermediate table
             final ExecutableState state = 
executableManager.getOutput(jobId).getState();
             if (!state.isFinalState()) {
                 workingJobList.add(jobId);
-                logger.info("Skip intermediate hive table with job id " + 
jobId + " with job status " + state);
+                sb.append(jobId).append("(").append(state).append("), ");
             }
         }
+        logger.info("Working jobIDs: " + workingJobList);
 
         while ((line = reader.readLine()) != null) {
+
+            logger.info("Checking table " + line);
+
             if (!line.startsWith(preFix))
                 continue;
 
@@ -295,12 +300,15 @@ public class StorageCleanupJob extends 
AbstractApplication {
                 if (UUId_PATTERN.matcher(uuid).matches()) {
                     //Check whether it's a hive table in use
                     if (isTableInUse(uuid, workingJobList)) {
+                        logger.info("Skip because not isTableInUse");
                         isNeedDel = false;
                     }
                 } else {
+                    logger.info("Skip because not match pattern");
                     isNeedDel = false;
                 }
             } else {
+                logger.info("Skip because length not qualified");
                 isNeedDel = false;
             }
 

Reply via email to