You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iceberg.apache.org by bl...@apache.org on 2022/11/16 16:06:47 UTC

[iceberg] branch master updated: Revert "Hive: Forward catalog-specific Hive configuration properties (#5989)" (#6187)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new c6a1cc4947 Revert "Hive: Forward catalog-specific Hive configuration properties (#5989)" (#6187)
c6a1cc4947 is described below

commit c6a1cc4947bd624057ac9dbb178b9d9c426055c5
Author: Pavan Lanka <pl...@apple.com>
AuthorDate: Wed Nov 16 08:06:40 2022 -0800

    Revert "Hive: Forward catalog-specific Hive configuration properties (#5989)" (#6187)
    
    This reverts commit 4b5e39d32f1c1d07d4d8d131f96beef962143e94.
---
 .../src/main/java/org/apache/iceberg/hive/HiveCatalog.java   |  9 ---------
 .../test/java/org/apache/iceberg/hive/TestHiveCatalog.java   | 12 ------------
 2 files changed, 21 deletions(-)

diff --git a/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java b/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
index 4635d43698..1a46580778 100644
--- a/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
+++ b/hive-metastore/src/main/java/org/apache/iceberg/hive/HiveCatalog.java
@@ -62,7 +62,6 @@ import org.slf4j.LoggerFactory;
 public class HiveCatalog extends BaseMetastoreCatalog implements SupportsNamespaces, Configurable {
   public static final String LIST_ALL_TABLES = "list-all-tables";
   public static final String LIST_ALL_TABLES_DEFAULT = "false";
-  private static final String HIVE_PROPERTY_PREFIX = "hive.";
 
   private static final Logger LOG = LoggerFactory.getLogger(HiveCatalog.class);
 
@@ -84,14 +83,6 @@ public class HiveCatalog extends BaseMetastoreCatalog implements SupportsNamespa
       this.conf = new Configuration();
     }
 
-    // Forward all catalog properties that begin with `hive.` into configuration for use in setting
-    // up the MetastoreClient
-    for (Map.Entry<String, String> entry : properties.entrySet()) {
-      if (entry.getKey().startsWith(HIVE_PROPERTY_PREFIX)) {
-        this.conf.set(entry.getKey(), entry.getValue());
-      }
-    }
-
     if (properties.containsKey(CatalogProperties.URI)) {
       this.conf.set(HiveConf.ConfVars.METASTOREURIS.varname, properties.get(CatalogProperties.URI));
     }
diff --git a/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java b/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java
index f0aa628a57..89daf07703 100644
--- a/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java
+++ b/hive-metastore/src/test/java/org/apache/iceberg/hive/TestHiveCatalog.java
@@ -152,18 +152,6 @@ public class TestHiveCatalog extends HiveMetastoreTest {
         });
   }
 
-  @Test
-  public void testInitializeWithHiveProperties() {
-    HiveCatalog catalog = new HiveCatalog();
-    Map<String, String> props = Maps.newHashMap();
-    props.put(HiveConf.ConfVars.METASTORE_TOKEN_SIGNATURE.varname, "alias1");
-    props.put("non.forwarding.signature", "alias2");
-    catalog.initialize("hive", props);
-    Assertions.assertEquals(
-        "alias1", catalog.getConf().get(HiveConf.ConfVars.METASTORE_TOKEN_SIGNATURE.varname));
-    Assertions.assertNull(catalog.getConf().get("non.forwarding.signature"));
-  }
-
   @Test
   public void testToStringWithoutSetConf() {
     Assertions.assertDoesNotThrow(