public abstract class SynchronizationActionBase extends ActionBase
Action
for table/database synchronizing job.Modifier and Type | Field and Description |
---|---|
protected boolean |
allowUpperCase |
protected org.apache.flink.configuration.Configuration |
cdcSourceConfig |
protected String |
database |
protected CdcMetadataConverter[] |
metadataConverters |
protected SyncJobHandler |
syncJobHandler |
protected Map<String,String> |
tableConfig |
protected TypeMapping |
typeMapping |
batchTEnv, catalog, catalogName, catalogOptions, env, flinkCatalog
Constructor and Description |
---|
SynchronizationActionBase(String warehouse,
String database,
Map<String,String> catalogConfig,
Map<String,String> cdcSourceConfig,
SyncJobHandler syncJobHandler) |
catalogConfig, catalogLoader, compatibleCheck, execute, initFlinkCatalog, initFlinkEnv, initPaimonCatalog, toPaimonTypes, withStreamExecutionEnvironment
protected final String database
protected final org.apache.flink.configuration.Configuration cdcSourceConfig
protected final SyncJobHandler syncJobHandler
protected final boolean allowUpperCase
protected TypeMapping typeMapping
protected CdcMetadataConverter[] metadataConverters
public SynchronizationActionBase withTableConfig(Map<String,String> tableConfig)
public SynchronizationActionBase withTypeMapping(TypeMapping typeMapping)
public SynchronizationActionBase withMetadataColumns(List<String> metadataColumns)
@VisibleForTesting public Map<String,String> tableConfig()
public void build() throws Exception
Action
This method is responsible for setting up any necessary configurations or resources needed for the action to run. It is called before the `run` method to prepare the environment for execution.
By default, this method is empty and can be overridden by subclasses to provide custom setup logic.
Exception
- If an error occurs during the build process.protected abstract void validateCaseSensitivity()
protected void beforeBuildingSourceSink() throws Exception
Exception
protected Object buildSource()
protected CdcTimestampExtractor createCdcTimestampExtractor()
protected void validateRuntimeExecutionMode()
protected abstract org.apache.flink.api.common.functions.FlatMapFunction<CdcSourceRecord,RichCdcMultiplexRecord> recordParse()
protected abstract EventParser.Factory<RichCdcMultiplexRecord> buildEventParserFactory()
protected abstract void buildSink(org.apache.flink.streaming.api.datastream.DataStream<RichCdcMultiplexRecord> input, EventParser.Factory<RichCdcMultiplexRecord> parserFactory)
protected FileStoreTable alterTableOptions(Identifier identifier, FileStoreTable table)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.