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

dkuzmenko 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 1105c253a9c HIVE-29145: HMS Iceberg REST fails on common HMS (#6156)
1105c253a9c is described below

commit 1105c253a9c986b936187b6cd82f3bd536a14b69
Author: Shohei Okumiya <[email protected]>
AuthorDate: Wed Oct 29 18:16:37 2025 +0900

    HIVE-29145: HMS Iceberg REST fails on common HMS (#6156)
---
 .../org/apache/iceberg/rest/HMSCatalogAdapter.java     | 18 ------------------
 1 file changed, 18 deletions(-)

diff --git 
a/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java
 
b/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java
index 7523ee55dca..3a8f96d9606 100644
--- 
a/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java
+++ 
b/standalone-metastore/metastore-rest-catalog/src/main/java/org/apache/iceberg/rest/HMSCatalogAdapter.java
@@ -19,9 +19,7 @@
 
 package org.apache.iceberg.rest;
 
-import com.codahale.metrics.Counter;
 import com.google.common.base.Preconditions;
-import org.apache.hadoop.hive.metastore.metrics.Metrics;
 import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
@@ -80,8 +78,6 @@
  * Adaptor class to translate REST requests into {@link Catalog} API calls.
  */
 public class HMSCatalogAdapter implements RESTClient {
-  /**  The metric names prefix. */
-  static final String HMS_METRIC_PREFIX = "hmscatalog.";
   private static final Splitter SLASH = Splitter.on('/');
 
   private static final Map<Class<? extends Exception>, Integer> 
EXCEPTION_ERROR_CODES =
@@ -214,14 +210,6 @@ public Class<? extends RESTRequest> requestClass() {
     }
   }
 
-  /**
-   * @param route a route/api-call name
-   * @return the metric counter name for the api-call
-   */
-  static String hmsCatalogMetricCount(String route) {
-    return HMS_METRIC_PREFIX + route.toLowerCase() + ".count";
-  }
-
   private ConfigResponse config() {
     final List<Endpoint> endpoints = Arrays.stream(Route.values())
         .map(r -> Endpoint.create(r.method.name(), r.resourcePath)).toList();
@@ -421,12 +409,6 @@ private static void commitTransaction(Catalog catalog, 
CommitTransactionRequest
   @SuppressWarnings({"MethodLength", "unchecked"})
   private <T extends RESTResponse> T handleRequest(
       Route route, Map<String, String> vars, Object body) {
-    // update HMS catalog route counter metric
-    final String metricName = hmsCatalogMetricCount(route.name());
-    Counter counter = Metrics.getOrCreateCounter(metricName);
-    if (counter != null) {
-      counter.inc();
-    }
     switch (route) {
       case CONFIG:
         return (T) config();

Reply via email to