cxzl25 commented on code in PR #7385:
URL: https://github.com/apache/hudi/pull/7385#discussion_r1040448066


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/ddl/HMSDDLExecutor.java:
##########
@@ -78,7 +79,14 @@ public class HMSDDLExecutor implements DDLExecutor {
   public HMSDDLExecutor(HiveSyncConfig syncConfig) throws HiveException, 
MetaException {
     this.syncConfig = syncConfig;
     this.databaseName = syncConfig.getStringOrDefault(META_SYNC_DATABASE_NAME);
-    this.client = Hive.get(syncConfig.getHiveConf()).getMSC();
+    HiveConf hiveConf = syncConfig.getHiveConf();
+    IMetaStoreClient tempMetaStoreClient;
+    try {
+      tempMetaStoreClient = ((Hive) 
Hive.class.getMethod("getWithoutRegisterFns", HiveConf.class).invoke(null, 
hiveConf)).getMSC();

Review Comment:
   Hive 2.3.9  introduce method `Hive#getWithoutRegisterFns`.  
   https://issues.apache.org/jira/browse/HIVE-21563
   
   Spark 3.2.0 upgrades the Hive client to 2.3.9, so it can avoid initializing 
all functions in the environment where Hudi and Spark are integrated.  
   https://issues.apache.org/jira/browse/SPARK-34512
   
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to