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 2020/02/07 07:04:05 UTC

[kylin] 05/14: KYLIN-4226: Skip current unavailable tables when updating hbase coprocessor

This is an automated email from the ASF dual-hosted git repository.

nic pushed a commit to branch 2.6.x
in repository https://gitbox.apache.org/repos/asf/kylin.git

commit 9d2007febb7fdfb70917522166b12e5dff09826c
Author: Zhou Kang <zh...@xiaomi.com>
AuthorDate: Wed Oct 30 11:21:35 2019 +0800

    KYLIN-4226: Skip current unavailable tables when updating hbase coprocessor
---
 .../org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java  | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
index 215af1d..51bcbf7 100644
--- a/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
+++ b/storage-hbase/src/main/java/org/apache/kylin/storage/hbase/util/DeployCoprocessorCLI.java
@@ -195,7 +195,13 @@ public class DeployCoprocessorCLI {
             return tableNames;
         }
         logger.info("Commit Information: " + commitInfo);
+        int skipTableCnt = 0;
         for (String tableName : tableNames) {
+            if (!hbaseAdmin.isTableAvailable(TableName.valueOf(tableName))) {
+                logger.warn("Table: " + tableName + " is not available currently, skip it");
+                skipTableCnt ++;
+                continue;
+            }
             HTableDescriptor tableDesc = hbaseAdmin.getTableDescriptor(TableName.valueOf(tableName));
             String gitTag = tableDesc.getValue(IRealizationConstants.HTableGitTag);
             if (commitInfo.equals(gitTag)) {
@@ -204,6 +210,7 @@ public class DeployCoprocessorCLI {
                 result.add(tableName);
             }
         }
+        logger.info("Skip {} tables for not founding in HBase Cluster", skipTableCnt);
         logger.info("Filtered tables don't need to deploy coprocessors: " + filteredList);
         return result;
     }