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/06/13 03:12:10 UTC

[GitHub] [hudi] danny0405 commented on a diff in pull request #5754: [HUDI-3730] Improve meta sync class design and hierarchies

danny0405 commented on code in PR #5754:
URL: https://github.com/apache/hudi/pull/5754#discussion_r895295348


##########
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncConfig.java:
##########
@@ -24,79 +24,14 @@
 
 import com.beust.jcommander.Parameter;
 
+import java.io.Serializable;
+
 /**
  * Configs needed to sync data into the Hive Metastore.
  */
 public class HiveSyncConfig extends HoodieSyncConfig {
 
-  @Parameter(names = {"--user"}, description = "Hive username")
-  public String hiveUser;
-
-  @Parameter(names = {"--pass"}, description = "Hive password")
-  public String hivePass;
-
-  @Parameter(names = {"--jdbc-url"}, description = "Hive jdbc connect url")
-  public String jdbcUrl;
-
-  @Parameter(names = {"--metastore-uris"}, description = "Hive metastore uris")
-  public String metastoreUris;
-
-  @Parameter(names = {"--use-pre-apache-input-format"},
-      description = "Use InputFormat under com.uber.hoodie package "
-          + "instead of org.apache.hudi package. Use this when you are in the process of migrating from "
-          + "com.uber.hoodie to org.apache.hudi. Stop using this after you migrated the table definition to "
-          + "org.apache.hudi input format.")
-  public Boolean usePreApacheInputFormat;
-
-  @Parameter(names = {"--bucket-spec"}, description = "bucket spec stored in metastore", required = false)
-  public String bucketSpec;
-
-  @Deprecated
-  @Parameter(names = {"--use-jdbc"}, description = "Hive jdbc connect url")
-  public Boolean useJdbc;
-
-  @Parameter(names = {"--sync-mode"}, description = "Mode to choose for Hive ops. Valid values are hms,glue,jdbc and hiveql")
-  public String syncMode;
-
-  @Parameter(names = {"--auto-create-database"}, description = "Auto create hive database")
-  public Boolean autoCreateDatabase;
-
-  @Parameter(names = {"--ignore-exceptions"}, description = "Ignore hive exceptions")
-  public Boolean ignoreExceptions;
-
-  @Parameter(names = {"--skip-ro-suffix"}, description = "Skip the `_ro` suffix for Read optimized table, when registering")
-  public Boolean skipROSuffix;
-
-  @Parameter(names = {"--table-properties"}, description = "Table properties to hive table")
-  public String tableProperties;
-
-  @Parameter(names = {"--serde-properties"}, description = "Serde properties to hive table")
-  public String serdeProperties;
-
-  @Parameter(names = {"--help", "-h"}, help = true)
-  public Boolean help = false;
-
-  @Parameter(names = {"--support-timestamp"}, description = "'INT64' with original type TIMESTAMP_MICROS is converted to hive 'timestamp' type."
-      + "Disabled by default for backward compatibility.")
-  public Boolean supportTimestamp;
-
-  @Parameter(names = {"--managed-table"}, description = "Create a managed table")
-  public Boolean createManagedTable;
-
-  @Parameter(names = {"--batch-sync-num"}, description = "The number of partitions one batch when synchronous partitions to hive")
-  public Integer batchSyncNum;
-
-  @Parameter(names = {"--spark-datasource"}, description = "Whether sync this table as spark data source table.")
-  public Boolean syncAsSparkDataSourceTable;
-
-  @Parameter(names = {"--spark-schema-length-threshold"}, description = "The maximum length allowed in a single cell when storing additional schema information in Hive's metastore.")
-  public int sparkSchemaLengthThreshold;
-
-  @Parameter(names = {"--with-operation-field"}, description = "Whether to include the '_hoodie_operation' field in the metadata fields")
-  public Boolean withOperationField = false;
-
-  @Parameter(names = {"--sync-comment"}, description = "synchronize table comments to hive")
-  public boolean syncComment = false;
+  public final HiveSyncConfigParams hiveSyncConfigParams = new HiveSyncConfigParams();
 

Review Comment:
   Can we avoid introducing nested POJOs ? The POJO brings in too many modifications but no benefit here ?



-- 
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