You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by bo...@apache.org on 2019/08/27 12:19:17 UTC

[impala] 01/04: Remove redundant table name population in Kudu integration

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

boroknagyz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit 141066684ddb7542575280a6b8acde06ff201dfe
Author: Hao Hao <ha...@cloudera.com>
AuthorDate: Fri Aug 23 13:50:16 2019 -0700

    Remove redundant table name population in Kudu integration
    
    This patch removes the hack to populate table name if empty in Kudu
    integration. Since with the current Kudu version, the storage handler
    now supports 'kudu.table_name' property and this table name should not
    be empty.
    
    Change-Id: Iaa88ae5f0597ef203b60adcc972d06f8f4a418b7
    Reviewed-on: http://gerrit.cloudera.org:8080/14130
    Reviewed-by: Thomas Tauber-Marshall <tm...@cloudera.com>
    Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
 .../java/org/apache/impala/catalog/KuduTable.java  | 25 ----------------------
 1 file changed, 25 deletions(-)

diff --git a/fe/src/main/java/org/apache/impala/catalog/KuduTable.java b/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
index 338c979..3db60ee 100644
--- a/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
+++ b/fe/src/main/java/org/apache/impala/catalog/KuduTable.java
@@ -117,13 +117,6 @@ public class KuduTable extends Table implements FeKuduTable {
     super(msTable, db, name, owner);
     kuduTableName_ = msTable.getParameters().get(KuduTable.KEY_TABLE_NAME);
     kuduMasters_ = msTable.getParameters().get(KuduTable.KEY_MASTER_HOSTS);
-    if (kuduTableName_ == null || kuduTableName_.isEmpty()) {
-      // When 'kudu.table_name' property is empty, it implies Kudu/HMS
-      // integration is enabled.
-      // TODO: remove this hack once Kudu support 'kudu.table_name'
-      // property with the new storage handler.
-      populateDefaultTableName(msTable, /* isHMSIntegrationEnabled */true);
-    }
   }
 
   @Override
@@ -166,17 +159,6 @@ public class KuduTable extends Table implements FeKuduTable {
   }
 
   /**
-   * Populates the default table name.
-   */
-  private void populateDefaultTableName(
-      org.apache.hadoop.hive.metastore.api.Table msTbl,
-      boolean isHMSIntegrationEnabled) {
-    kuduTableName_ = KuduUtil.getDefaultKuduTableName(
-        msTbl.getDbName(), msTbl.getTableName(), isHMSIntegrationEnabled);
-    msTbl.getParameters().put(KuduTable.KEY_TABLE_NAME, kuduTableName_);
-  }
-
-  /**
    * Get the Hive Metastore configuration from Kudu masters.
    */
   private static HiveMetastoreConfig getHiveMetastoreConfig(String kuduMasters)
@@ -297,13 +279,6 @@ public class KuduTable extends Table implements FeKuduTable {
       // Copy the table to check later if anything has changed.
       msTable_ = msTbl.deepCopy();
       kuduTableName_ = msTable_.getParameters().get(KuduTable.KEY_TABLE_NAME);
-      if (kuduTableName_ == null || kuduTableName_.isEmpty()) {
-        // When 'kudu.table_name' property is empty, it implies Kudu/HMS
-        // integration is enabled.
-        // TODO: remove this hack once Kudu support 'kudu.table_name'
-        // property with the new storage handler.
-        populateDefaultTableName(msTable_, /* isHMSIntegrationEnabled */true);
-      }
       kuduMasters_ = msTable_.getParameters().get(KuduTable.KEY_MASTER_HOSTS);
       if (kuduMasters_ == null || kuduMasters_.isEmpty()) {
         throw new TableLoadingException("No " + KuduTable.KEY_MASTER_HOSTS +