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/11/06 09:31:04 UTC
[28/49] kylin git commit: refine StorageCleanupJob
refine StorageCleanupJob
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo
Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/2dffc1dc
Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/2dffc1dc
Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/2dffc1dc
Branch: refs/heads/KYLIN-1971
Commit: 2dffc1dc47f480f374a119f02f95d8e5da84d486
Parents: 99eb648
Author: Hongbin Ma <ma...@apache.org>
Authored: Tue Nov 1 13:31:04 2016 +0800
Committer: Hongbin Ma <ma...@apache.org>
Committed: Thu Nov 3 13:34:12 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/2dffc1dc/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 2c2f11c..dcd90e9 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
@@ -260,16 +260,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;
@@ -288,12 +293,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;
}