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 2021/05/17 15:07:56 UTC

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

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



##########
File path: hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java
##########
@@ -63,6 +63,10 @@
 
   public HiveSyncTool(HiveSyncConfig cfg, HiveConf configuration, FileSystem fs) {
     super(configuration.getAllProperties(), fs);
+    //Set Hive meta store URI which enables synchronize to remote hive
+    if (cfg.hiveMetaStoreUri != null) {
+      configuration.set("hive.metastore.uris",cfg.hiveMetaStoreUri);

Review comment:
       In HoodieSparkSqlWriter.scala,
   
   private def buildSyncConfig(basePath: Path, parameters: Map[String, String]): HiveSyncConfig = {
       val hiveSyncConfig: HiveSyncConfig = new HiveSyncConfig()
       hiveSyncConfig.basePath = basePath.toString
       hiveSyncConfig.baseFileFormat = parameters(HIVE_BASE_FILE_FORMAT_OPT_KEY)
       hiveSyncConfig.usePreApacheInputFormat =
         parameters.get(HIVE_USE_PRE_APACHE_INPUT_FORMAT_OPT_KEY).exists(r => r.toBoolean)
       hiveSyncConfig.databaseName = parameters(HIVE_DATABASE_OPT_KEY)
       hiveSyncConfig.tableName = parameters(HIVE_TABLE_OPT_KEY)
       hiveSyncConfig.hiveUser = parameters(HIVE_USER_OPT_KEY)
       hiveSyncConfig.hivePass = parameters(HIVE_PASS_OPT_KEY)
   ...
   
   
   @nsivabalan  - This converts from the hudi params to the hive config. 




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