Skip to content

Commit

Permalink
Resolve metastore uri config before loading fs conf
Browse files Browse the repository at this point in the history
  • Loading branch information
codope committed Jun 7, 2022
1 parent 67c4054 commit 69894b3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ public HiveSyncTool(TypedProperties props, Configuration conf, FileSystem fs) {

public HiveSyncTool(HiveSyncConfig hiveSyncConfig, HiveConf hiveConf, FileSystem fs) {
super(hiveSyncConfig.getProps(), hiveConf, fs);
hiveConf.addResource(fs.getConf());
// TODO: reconcile the way to set METASTOREURIS
if (StringUtils.isNullOrEmpty(hiveConf.get(HiveConf.ConfVars.METASTOREURIS.varname))) {
hiveConf.set(HiveConf.ConfVars.METASTOREURIS.varname, hiveSyncConfig.metastoreUris);
}
// HiveConf needs to load fs conf to allow instantiation via AWSGlueClientFactory
hiveConf.addResource(fs.getConf());
initClient(hiveSyncConfig, hiveConf);
initConfig(hiveSyncConfig);
}
Expand Down

0 comments on commit 69894b3

Please sign in to comment.