You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2022/08/01 16:52:03 UTC
[GitHub] [hudi] 5herhom commented on a diff in pull request #6257: [HUDI-4510] Repair config "hive_sync.metastore.uris" in flink sql hive schema sync is not effective
5herhom commented on code in PR #6257:
URL: https://github.com/apache/hudi/pull/6257#discussion_r934730986
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/utils/HiveSyncContext.java:
##########
@@ -84,6 +84,9 @@ public static HiveSyncContext create(Configuration conf, SerializableConfigurati
org.apache.hadoop.conf.Configuration hadoopConf = HadoopConfigurations.getHadoopConf(conf);
HiveConf hiveConf = new HiveConf();
hiveConf.addResource(serConf.get());
+ if (!FlinkOptions.isDefaultValueDefined(conf, FlinkOptions.HIVE_SYNC_METASTORE_URIS)) {
+ hadoopConf.set(HiveConf.ConfVars.METASTOREURIS.varname, conf.getString(FlinkOptions.HIVE_SYNC_METASTORE_URIS));
+ }
Review Comment:
**buildSyncConfig()** just put config into`HiveSyncContext.props`, but not `HiveSyncConfig.hadoopConf`. When running to constructor of HMSDDLExecutor, it call `syncConfig.getHiveConf()` to use the `HiveSyncConfig.hadoopConf`:
`this.client = Hive.get(syncConfig.getHiveConf()).getMSC();`
There is no code to put 'hive_sync.metastore.uris' from `HiveSyncContext.props` to `syncConfig.getHiveConf()`. Which make an exception when use hive sync by metastore.
I found the code is removed in the pull: [https://github.com/apache/hudi/pull/5854](url) . I think it causes the error.

--
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: commits-unsubscribe@hudi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org