[GitHub] [hudi] danny0405 commented on a change in pull request #2449: [HUDI-1528] hudi-sync-tools supports synchronization to remote hive

2021-01-21 Thread GitBox


danny0405 commented on a change in pull request #2449:
URL: https://github.com/apache/hudi/pull/2449#discussion_r561587235



##
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:
   What is the purpose of the decision `hiveSyncConfig.hiveMetaStoreUri != 
null` ?

##
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:
   Looks weird, in which case the `hiveSyncConfig.hiveMetaStoreUri` can be 
null and what is the priority between the `hiveSyncConfig` and the `props` ?





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:
us...@infra.apache.org




[GitHub] [hudi] danny0405 commented on a change in pull request #2449: [HUDI-1528] hudi-sync-tools supports synchronization to remote hive

2021-01-20 Thread GitBox


danny0405 commented on a change in pull request #2449:
URL: https://github.com/apache/hudi/pull/2449#discussion_r561628258



##
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:
   Looks weird, in which case the `hiveSyncConfig.hiveMetaStoreUri` can be 
null and what is the priority between the `hiveSyncConfig` and the `props` ?





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:
us...@infra.apache.org




[GitHub] [hudi] danny0405 commented on a change in pull request #2449: [HUDI-1528] hudi-sync-tools supports synchronization to remote hive

2021-01-20 Thread GitBox


danny0405 commented on a change in pull request #2449:
URL: https://github.com/apache/hudi/pull/2449#discussion_r561587235



##
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:
   What is the purpose of the decision `hiveSyncConfig.hiveMetaStoreUri != 
null` ?





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:
us...@infra.apache.org