1
0

[HUDI-3771] flink supports sync table information to aws glue (#5202)

This commit is contained in:
todd5167
2022-04-02 21:16:10 +08:00
committed by GitHub
parent 020786a5f9
commit eef3f9c74a
4 changed files with 12 additions and 2 deletions

View File

@@ -18,10 +18,12 @@
package org.apache.hudi.sink.utils;
import org.apache.hudi.aws.sync.AwsGlueCatalogSyncTool;
import org.apache.hudi.common.fs.FSUtils;
import org.apache.hudi.configuration.FlinkOptions;
import org.apache.hudi.hive.HiveSyncConfig;
import org.apache.hudi.hive.HiveSyncTool;
import org.apache.hudi.hive.ddl.HiveSyncMode;
import org.apache.hudi.table.format.FilePathUtils;
import org.apache.hudi.util.StreamerUtil;
@@ -48,6 +50,10 @@ public class HiveSyncContext {
}
public HiveSyncTool hiveSyncTool() {
HiveSyncMode syncMode = HiveSyncMode.of(syncConfig.syncMode);
if (syncMode == HiveSyncMode.GLUE) {
return new AwsGlueCatalogSyncTool(this.syncConfig, this.hiveConf, this.fs);
}
return new HiveSyncTool(this.syncConfig, this.hiveConf, this.fs);
}