Trevor-zhang commented on a change in pull request #2449:
URL: https://github.com/apache/hudi/pull/2449#discussion_r561621697
##########
File path:
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/DataSourceUtils.java
##########
@@ -284,6 +284,9 @@ public static HiveSyncConfig
buildHiveSyncConfig(TypedProperties props, String b
props.getString(DataSourceWriteOptions.HIVE_PASS_OPT_KEY(),
DataSourceWriteOptions.DEFAULT_HIVE_PASS_OPT_VAL());
hiveSyncConfig.jdbcUrl =
props.getString(DataSourceWriteOptions.HIVE_URL_OPT_KEY(),
DataSourceWriteOptions.DEFAULT_HIVE_URL_OPT_VAL());
+ if (hiveSyncConfig.hiveMetaStoreUri != null) {
+ hiveSyncConfig.hiveMetaStoreUri =
props.getString(DataSourceWriteOptions.HIVE_URL_OPT_KEY(),
DataSourceWriteOptions.DEFAULT_HIVE_METASTORE_URI_OPT_VAL());
+ }
Review comment:
Because this is not a required option .
##########
File path:
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/DataSourceUtils.java
##########
@@ -284,6 +284,9 @@ public static HiveSyncConfig
buildHiveSyncConfig(TypedProperties props, String b
props.getString(DataSourceWriteOptions.HIVE_PASS_OPT_KEY(),
DataSourceWriteOptions.DEFAULT_HIVE_PASS_OPT_VAL());
hiveSyncConfig.jdbcUrl =
props.getString(DataSourceWriteOptions.HIVE_URL_OPT_KEY(),
DataSourceWriteOptions.DEFAULT_HIVE_URL_OPT_VAL());
+ if (hiveSyncConfig.hiveMetaStoreUri != null) {
+ hiveSyncConfig.hiveMetaStoreUri =
props.getString(DataSourceWriteOptions.HIVE_URL_OPT_KEY(),
DataSourceWriteOptions.DEFAULT_HIVE_METASTORE_URI_OPT_VAL());
+ }
Review comment:
(1) When synchronizing hudi data with local hive,`
hiveSyncConfig.hiveMetaStoreUri` can be set to null.
(2) There is no priority distinction between `hiveSyncConfig` and `props`.
Because there is no props attribute in `hiveSyncConfig`, only a single
attribute is set.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]