This is an automated email from the ASF dual-hosted git repository.
JingsongLi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 4584230dba [hive] Fix malformed error message for unknown client pool
cache key (#8639)
4584230dba is described below
commit 4584230dbab48419c95fb56025e772c56afeecb4
Author: Eunbin Son <[email protected]>
AuthorDate: Thu Jul 16 14:28:01 2026 +0900
[hive] Fix malformed error message for unknown client pool cache key (#8639)
---
.../java/org/apache/paimon/hive/pool/CachedClientPool.java | 2 +-
.../org/apache/paimon/hive/pool/TestCachedClientPool.java | 13 +++++++++++++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git
a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/pool/CachedClientPool.java
b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/pool/CachedClientPool.java
index 93a1005973..ff981532f4 100644
---
a/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/pool/CachedClientPool.java
+++
b/paimon-hive/paimon-hive-catalog/src/main/java/org/apache/paimon/hive/pool/CachedClientPool.java
@@ -176,7 +176,7 @@ public class CachedClientPool implements
ClientPool<IMetaStoreClient, TException
types.add(type);
break;
default:
- throw new RuntimeException("Unknown key element %s" +
trimmed);
+ throw new RuntimeException("Unknown key element " +
trimmed);
}
}
}
diff --git
a/paimon-hive/paimon-hive-catalog/src/test/java/org/apache/paimon/hive/pool/TestCachedClientPool.java
b/paimon-hive/paimon-hive-catalog/src/test/java/org/apache/paimon/hive/pool/TestCachedClientPool.java
index 596ccf5c19..0b14565382 100644
---
a/paimon-hive/paimon-hive-catalog/src/test/java/org/apache/paimon/hive/pool/TestCachedClientPool.java
+++
b/paimon-hive/paimon-hive-catalog/src/test/java/org/apache/paimon/hive/pool/TestCachedClientPool.java
@@ -42,10 +42,23 @@ import java.util.UUID;
import static
org.apache.hadoop.hive.conf.HiveConf.ConfVars.METASTORECONNECTURLKEY;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
/** Tests for {@link CachedClientPool}. */
public class TestCachedClientPool {
+ @Test
+ public void testExtractKeyUnknownElementErrorMessage() {
+ assertThatThrownBy(
+ () ->
+ CachedClientPool.extractKey(
+ HiveMetaStoreClient.class.getName(),
+ "conf",
+ new Configuration()))
+ .isInstanceOf(RuntimeException.class)
+ .hasMessage("Unknown key element conf");
+ }
+
@Test
public void testCacheKeyNotSame() {
// client1 use cache key type:paimon