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

saihemanth-cloudera pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new f44371956d5 HIVE-30001: Disable Iceberg REST catalog caching (#6836)
f44371956d5 is described below

commit f44371956d5705b4827377df0f63e7a6a1767718
Author: Sai Hemanth Gantasala 
<[email protected]>
AuthorDate: Fri Oct 16 09:20:35 2026 -0700

    HIVE-30001: Disable Iceberg REST catalog caching (#6836)
    
    Co-authored-by: Cursor <[email protected]>
---
 .../hadoop/hive/metastore/conf/MetastoreConf.java  |   4 -
 .../org/apache/iceberg/rest/HMSCachingCatalog.java | 134 ---------------------
 .../org/apache/iceberg/rest/HMSCatalogFactory.java |   3 +-
 3 files changed, 1 insertion(+), 140 deletions(-)

diff --git 
a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
 
b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
index 853139b26e7..733bf0dec42 100644
--- 
a/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
+++ 
b/standalone-metastore/metastore-common/src/main/java/org/apache/hadoop/hive/metastore/conf/MetastoreConf.java
@@ -1974,10 +1974,6 @@ public enum ConfVars {
         "hive.metastore.iceberg.catalog.servlet.path", "iceberg",
         "HMS Iceberg Catalog servlet path component of URL endpoint."
     ),
-    ICEBERG_CATALOG_CACHE_EXPIRY("metastore.iceberg.catalog.cache.expiry",
-        "hive.metastore.iceberg.catalog.cache.expiry", -1,
-        "HMS Iceberg Catalog cache expiry."
-    ),
     
ICEBERG_CATALOG_UNIQUE_TABLE_LOCATION("metastore.iceberg.catalog.unique.table.location",
         "hive.metastore.iceberg.catalog.unique.table.location", false,
         "Whether the HMS Iceberg REST catalog should assign a unique storage 
location for each new table."
diff --git 
a/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCachingCatalog.java
 
b/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCachingCatalog.java
deleted file mode 100644
index a78bd6cfbf5..00000000000
--- 
a/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCachingCatalog.java
+++ /dev/null
@@ -1,134 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iceberg.rest;
-
-import com.github.benmanes.caffeine.cache.Ticker;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import org.apache.iceberg.CachingCatalog;
-import org.apache.iceberg.Schema;
-import org.apache.iceberg.catalog.Catalog;
-import org.apache.iceberg.catalog.Namespace;
-import org.apache.iceberg.catalog.SupportsNamespaces;
-import org.apache.iceberg.catalog.TableIdentifier;
-import org.apache.iceberg.catalog.ViewCatalog;
-import org.apache.iceberg.exceptions.NamespaceNotEmptyException;
-import org.apache.iceberg.exceptions.NoSuchNamespaceException;
-import org.apache.iceberg.hive.HiveCatalog;
-import org.apache.iceberg.view.View;
-import org.apache.iceberg.view.ViewBuilder;
-
-
-/**
- * Class that wraps an Iceberg Catalog to cache tables.
- */
-public class HMSCachingCatalog extends CachingCatalog implements 
SupportsNamespaces, ViewCatalog {
-  private final HiveCatalog hiveCatalog;
-  
-  public HMSCachingCatalog(HiveCatalog catalog, long expiration) {
-    super(catalog, true, expiration, Ticker.systemTicker());
-    this.hiveCatalog = catalog;
-  }
-
-  @Override
-  public Catalog.TableBuilder buildTable(TableIdentifier identifier, Schema 
schema) {
-    return hiveCatalog.buildTable(identifier, schema);
-  }
-
-  @Override
-  public void createNamespace(Namespace nmspc, Map<String, String> map) {
-    hiveCatalog.createNamespace(nmspc, map);
-  }
-
-  @Override
-  public List<Namespace> listNamespaces(Namespace nmspc) throws 
NoSuchNamespaceException {
-    return hiveCatalog.listNamespaces(nmspc);
-  }
-
-  @Override
-  public Map<String, String> loadNamespaceMetadata(Namespace nmspc) throws 
NoSuchNamespaceException {
-    return hiveCatalog.loadNamespaceMetadata(nmspc);
-  }
-
-  @Override
-  public boolean dropNamespace(Namespace nmspc) throws 
NamespaceNotEmptyException {
-    List<TableIdentifier> tables = listTables(nmspc);
-    for (TableIdentifier ident : tables) {
-      invalidateTable(ident);
-    }
-    return hiveCatalog.dropNamespace(nmspc);
-  }
-
-  @Override
-  public boolean setProperties(Namespace nmspc, Map<String, String> map) 
throws NoSuchNamespaceException {
-    return hiveCatalog.setProperties(nmspc, map);
-  }
-
-  @Override
-  public boolean removeProperties(Namespace nmspc, Set<String> set) throws 
NoSuchNamespaceException {
-    return hiveCatalog.removeProperties(nmspc, set);
-  }
-
-  @Override
-  public boolean namespaceExists(Namespace namespace) {
-    return hiveCatalog.namespaceExists(namespace);
-  }
-
-  @Override
-  public List<TableIdentifier> listViews(Namespace namespace) {
-    return hiveCatalog.listViews(namespace);
-  }
-
-  @Override
-  public View loadView(TableIdentifier identifier) {
-    return hiveCatalog.loadView(identifier);
-  }
-
-  @Override
-  public boolean viewExists(TableIdentifier identifier) {
-    return hiveCatalog.viewExists(identifier);
-  }
-
-  @Override
-  public ViewBuilder buildView(TableIdentifier identifier) {
-    return hiveCatalog.buildView(identifier);
-  }
-
-  @Override
-  public boolean dropView(TableIdentifier identifier) {
-    return hiveCatalog.dropView(identifier);
-  }
-
-  @Override
-  public void renameView(TableIdentifier from, TableIdentifier to) {
-    hiveCatalog.renameView(from, to);
-  }
-
-  @Override
-  public void invalidateView(TableIdentifier identifier) {
-    hiveCatalog.invalidateView(identifier);
-  }
-
-  @Override
-  public void initialize(String name, Map<String, String> properties) {
-    hiveCatalog.initialize(name, properties);
-  }
-}
diff --git 
a/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogFactory.java
 
b/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogFactory.java
index 6f169424626..13adeb08b19 100644
--- 
a/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogFactory.java
+++ 
b/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogFactory.java
@@ -101,8 +101,7 @@ private Catalog createCatalog() {
     hiveCatalog.setConf(configuration);
     final String catalogName = MetastoreConf.getVar(configuration, 
MetastoreConf.ConfVars.CATALOG_DEFAULT);
     hiveCatalog.initialize(catalogName, properties);
-    long expiry = MetastoreConf.getLongVar(configuration, 
MetastoreConf.ConfVars.ICEBERG_CATALOG_CACHE_EXPIRY);
-    return expiry > 0 ? new HMSCachingCatalog(hiveCatalog, expiry) : 
hiveCatalog;
+    return hiveCatalog;
   }
 
   /**

Reply via email to