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

yihua pushed a commit to branch release-1.2.0
in repository https://gitbox.apache.org/repos/asf/hudi.git

commit b2d6222bc577d975476edbbce31c48c40df1655b
Author: Prashant Wason <[email protected]>
AuthorDate: Wed Apr 29 19:41:55 2026 -0700

    fix: make SparkCatalogMetaStoreClient.setMetaConf a no-op (#18652)
    
    HoodieHiveSyncClient invokes IMetaStoreClient.setMetaConf at construction
    time to forward hive.metastore.callerContext.* properties to the
    metastore for audit/tracing. With Spark's external catalog there is no
    remote HMS to receive those values, so throwing 
UnsupportedOperationException
    unconditionally breaks every sync client that uses
    SparkCatalogMetaStoreClient (it fails before any actual catalog operation
    can run).
    
    Accept the call silently. The caller-context properties are diagnostic
    metadata; dropping them is the correct semantic for a non-thrift catalog
    backend.
    
    Co-authored-by: Claude Opus 4.7 <[email protected]>
---
 .../org/apache/spark/sql/hive/SparkCatalogMetaStoreClient.scala     | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 
a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hive/SparkCatalogMetaStoreClient.scala
 
b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hive/SparkCatalogMetaStoreClient.scala
index bf73a5bb064f..bd1133e5c31a 100644
--- 
a/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hive/SparkCatalogMetaStoreClient.scala
+++ 
b/hudi-spark-datasource/hudi-spark-common/src/main/scala/org/apache/spark/sql/hive/SparkCatalogMetaStoreClient.scala
@@ -152,7 +152,11 @@ class SparkCatalogMetaStoreClient(syncConfig: 
HiveSyncConfig)
   override def isLocalMetaStore(): Boolean = unsupported[Boolean]()
   override def reconnect(): Unit = unsupported[Unit]()
   override def close(): Unit = unsupported[Unit]()
-  override def setMetaConf(arg0: String, arg1: String): Unit = 
unsupported[Unit]()
+  // setMetaConf is no-op: HoodieHiveSyncClient.setMetaConf forwards
+  // hive.metastore.callerContext.* values to the metastore for audit/tracing. 
With Spark's
+  // external catalog there is no remote HMS to forward to, so accept the call 
silently
+  // instead of breaking sync clients that exercise the standard 
IMetaStoreClient contract.
+  override def setMetaConf(arg0: String, arg1: String): Unit = {}
   override def getMetaConf(arg0: String): String = unsupported[String]()
   override def getDatabases(arg0: String): java.util.List[String] = 
unsupported[java.util.List[String]]()
   override def getAllDatabases(): java.util.List[String] = 
unsupported[java.util.List[String]]()

Reply via email to