nsivabalan commented on a change in pull request #2443:
URL: https://github.com/apache/hudi/pull/2443#discussion_r570230938
##########
File path:
hudi-sync/hudi-hive-sync/src/main/java/org/apache/hudi/hive/HiveSyncTool.java
##########
@@ -57,13 +57,23 @@
public static final String SUFFIX_READ_OPTIMIZED_TABLE = "_ro";
private final HiveSyncConfig cfg;
- private final HoodieHiveClient hoodieHiveClient;
+ private HoodieHiveClient hoodieHiveClient = null;
private final String snapshotTableName;
private final Option<String> roTableTableName;
public HiveSyncTool(HiveSyncConfig cfg, HiveConf configuration, FileSystem
fs) {
super(configuration.getAllProperties(), fs);
- this.hoodieHiveClient = new HoodieHiveClient(cfg, configuration, fs);
+
+ try {
+ this.hoodieHiveClient = new HoodieHiveClient(cfg, configuration, fs);
Review comment:
I guess there could be gap/bug in here. Did you happen to test it out.
if hoodieHiveClient is null (due to connect execution) and if caller
subsequently calls syncHoodieTable(), won't we end up with
NullPointerException? Can you please check.
##########
File path:
hudi-spark-datasource/hudi-spark-common/src/main/java/org/apache/hudi/DataSourceUtils.java
##########
@@ -293,6 +293,8 @@ public static HiveSyncConfig
buildHiveSyncConfig(TypedProperties props, String b
DataSourceWriteOptions.DEFAULT_HIVE_USE_JDBC_OPT_VAL()));
hiveSyncConfig.autoCreateDatabase =
Boolean.valueOf(props.getString(DataSourceWriteOptions.HIVE_AUTO_CREATE_DATABASE_OPT_KEY(),
DataSourceWriteOptions.DEFAULT_HIVE_AUTO_CREATE_DATABASE_OPT_KEY()));
+ hiveSyncConfig.ignoreConnectException =
Boolean.valueOf(props.getString(DataSourceWriteOptions.HIVE_IGNORE_CONNECT_EXCEPTION_OPT_KEY(),
Review comment:
nope. was just clarifying :)
----------------------------------------------------------------
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]