Class OracleSourceBuilder<T>
- java.lang.Object
-
- org.apache.flink.cdc.connectors.oracle.source.OracleSourceBuilder<T>
-
@Internal public class OracleSourceBuilder<T> extends Object
The builder class forOracleSourceBuilder.OracleIncrementalSourceto make it easier for the users to construct aOracleSourceBuilder.OracleIncrementalSource.Check the Java docs of each individual method to learn more about the settings to build a
OracleSourceBuilder.OracleIncrementalSource.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOracleSourceBuilder.OracleIncrementalSource<T>TheJdbcIncrementalSourceimplementation for Oracle.
-
Constructor Summary
Constructors Constructor Description OracleSourceBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OracleSourceBuilder<T>assignUnboundedChunkFirst(boolean assignUnboundedChunkFirst)Whether theOracleSourceBuilder.OracleIncrementalSourceshould assign the unbounded chunks first or not during snapshot reading phase.OracleSourceBuilder.OracleIncrementalSource<T>build()Build theOracleSourceBuilder.OracleIncrementalSource.OracleSourceBuilder<T>chunkKeyColumn(String chunkKeyColumn)The chunk key of table snapshot, captured tables are split into multiple chunks by the chunk key column when read the snapshot of table.OracleSourceBuilder<T>closeIdleReaders(boolean closeIdleReaders)Whether to close idle readers at the end of the snapshot phase.OracleSourceBuilder<T>connectionPoolSize(int connectionPoolSize)The connection pool size.OracleSourceBuilder<T>connectMaxRetries(int connectMaxRetries)The max retry times to get connection.OracleSourceBuilder<T>connectTimeout(java.time.Duration connectTimeout)The maximum time that the connector should wait after trying to connect to the Oracle database server before timing out.OracleSourceBuilder<T>databaseList(String... databaseList)An required list of regular expressions that match database names to be monitored; any database name not included in the whitelist will be excluded from monitoring.OracleSourceBuilder<T>debeziumProperties(Properties properties)The Debezium Oracle connector properties.OracleSourceBuilder<T>deserializer(DebeziumDeserializationSchema<T> deserializer)The deserializer used to convert from consumedSourceRecord.OracleSourceBuilder<T>distributionFactorLower(double distributionFactorLower)The lower bound of split key evenly distribution factor, the factor is used to determine whether the table is evenly distribution or not.OracleSourceBuilder<T>distributionFactorUpper(double distributionFactorUpper)The upper bound of split key evenly distribution factor, the factor is used to determine whether the table is evenly distribution or not.OracleSourceBuilder<T>fetchSize(int fetchSize)The maximum fetch size for per poll when read table snapshot.OracleSourceBuilder<T>hostname(String hostname)OracleSourceBuilder<T>includeSchemaChanges(boolean includeSchemaChanges)Whether theOracleSourceBuilder.OracleIncrementalSourceshould output the schema changes or not.OracleSourceBuilder<T>password(String password)Password to use when connecting to the Oracle database server.OracleSourceBuilder<T>port(int port)Integer port number of the Oracle database server.OracleSourceBuilder<T>releaseSnapshotMetadataEnabled(boolean releaseSnapshotMetadataEnabled)Whether to release the finished snapshot split metadata from the coordinator after entering the stream phase, to reduce JobManager memory pressure (FLINK-40697).OracleSourceBuilder<T>scanNewlyAddedTableEnabled(boolean scanNewlyAddedTableEnabled)Whether theOracleSourceBuilder.OracleIncrementalSourceshould scan the newly added tables or not.OracleSourceBuilder<T>schemaList(String... schemaList)An optional list of regular expressions that match schema names to be monitored; any schema name not included in the whitelist will be excluded from monitoring.OracleSourceBuilder<T>serverTimeZone(String timeZone)The session time zone in database server, e.g.OracleSourceBuilder<T>skipSnapshotBackfill(boolean skipSnapshotBackfill)Whether to skip backfill in snapshot reading phase.OracleSourceBuilder<T>splitMetaGroupSize(int splitMetaGroupSize)The group size of split meta, if the meta size exceeds the group size, the meta will be will be divided into multiple groups.OracleSourceBuilder<T>splitSize(int splitSize)The split size (number of rows) of table snapshot, captured tables are split into multiple splits when read the snapshot of table.OracleSourceBuilder<T>startupOptions(StartupOptions startupOptions)Specifies the startup options.OracleSourceBuilder<T>tableList(String... tableList)An required list of regular expressions that match fully-qualified table identifiers for tables to be monitored; any table not included in the list will be excluded from monitoring.OracleSourceBuilder<T>url(String url)Url to use when connecting to the Oracle database server.OracleSourceBuilder<T>username(String username)Name of the Oracle database to use when connecting to the Oracle database server.
-
-
-
Method Detail
-
hostname
public OracleSourceBuilder<T> hostname(String hostname)
-
url
public OracleSourceBuilder<T> url(@Nullable String url)
Url to use when connecting to the Oracle database server.
-
port
public OracleSourceBuilder<T> port(int port)
Integer port number of the Oracle database server.
-
databaseList
public OracleSourceBuilder<T> databaseList(String... databaseList)
An required list of regular expressions that match database names to be monitored; any database name not included in the whitelist will be excluded from monitoring.
-
schemaList
public OracleSourceBuilder<T> schemaList(String... schemaList)
An optional list of regular expressions that match schema names to be monitored; any schema name not included in the whitelist will be excluded from monitoring. By default all non-system schemas will be monitored.
-
tableList
public OracleSourceBuilder<T> tableList(String... tableList)
An required list of regular expressions that match fully-qualified table identifiers for tables to be monitored; any table not included in the list will be excluded from monitoring. Each identifier is of the form<databaseName>.<tableName>.
-
username
public OracleSourceBuilder<T> username(String username)
Name of the Oracle database to use when connecting to the Oracle database server.
-
password
public OracleSourceBuilder<T> password(String password)
Password to use when connecting to the Oracle database server.
-
serverTimeZone
public OracleSourceBuilder<T> serverTimeZone(String timeZone)
The session time zone in database server, e.g. "America/Los_Angeles". It controls how the TIMESTAMP type in Oracle converted to STRING. See more https://debezium.io/documentation/reference/1.9/connectors/oracle.html#oracle-temporal-types
-
splitSize
public OracleSourceBuilder<T> splitSize(int splitSize)
The split size (number of rows) of table snapshot, captured tables are split into multiple splits when read the snapshot of table.
-
splitMetaGroupSize
public OracleSourceBuilder<T> splitMetaGroupSize(int splitMetaGroupSize)
The group size of split meta, if the meta size exceeds the group size, the meta will be will be divided into multiple groups.
-
distributionFactorUpper
public OracleSourceBuilder<T> distributionFactorUpper(double distributionFactorUpper)
The upper bound of split key evenly distribution factor, the factor is used to determine whether the table is evenly distribution or not.
-
distributionFactorLower
public OracleSourceBuilder<T> distributionFactorLower(double distributionFactorLower)
The lower bound of split key evenly distribution factor, the factor is used to determine whether the table is evenly distribution or not.
-
fetchSize
public OracleSourceBuilder<T> fetchSize(int fetchSize)
The maximum fetch size for per poll when read table snapshot.
-
connectTimeout
public OracleSourceBuilder<T> connectTimeout(java.time.Duration connectTimeout)
The maximum time that the connector should wait after trying to connect to the Oracle database server before timing out.
-
connectMaxRetries
public OracleSourceBuilder<T> connectMaxRetries(int connectMaxRetries)
The max retry times to get connection.
-
connectionPoolSize
public OracleSourceBuilder<T> connectionPoolSize(int connectionPoolSize)
The connection pool size.
-
includeSchemaChanges
public OracleSourceBuilder<T> includeSchemaChanges(boolean includeSchemaChanges)
Whether theOracleSourceBuilder.OracleIncrementalSourceshould output the schema changes or not.
-
startupOptions
public OracleSourceBuilder<T> startupOptions(StartupOptions startupOptions)
Specifies the startup options.
-
chunkKeyColumn
public OracleSourceBuilder<T> chunkKeyColumn(String chunkKeyColumn)
The chunk key of table snapshot, captured tables are split into multiple chunks by the chunk key column when read the snapshot of table.
-
debeziumProperties
public OracleSourceBuilder<T> debeziumProperties(Properties properties)
The Debezium Oracle connector properties. For example, "snapshot.mode".
-
closeIdleReaders
public OracleSourceBuilder<T> closeIdleReaders(boolean closeIdleReaders)
Whether to close idle readers at the end of the snapshot phase. This feature depends on FLIP-147: Support Checkpoints After Tasks Finished. The flink version is required to be greater than or equal to 1.14, and the configuration'execution.checkpointing.checkpoints-after-tasks-finish.enabled'needs to be set to true.See more https://cwiki.apache.org/confluence/display/FLINK/FLIP-147%3A+Support+Checkpoints+After+Tasks+Finished.
-
deserializer
public OracleSourceBuilder<T> deserializer(DebeziumDeserializationSchema<T> deserializer)
The deserializer used to convert from consumedSourceRecord.
-
skipSnapshotBackfill
public OracleSourceBuilder<T> skipSnapshotBackfill(boolean skipSnapshotBackfill)
Whether to skip backfill in snapshot reading phase.If backfill is skipped, changes on captured tables during snapshot phase will be consumed later in binlog reading phase instead of being merged into the snapshot.
WARNING: Skipping backfill might lead to data inconsistency because some binlog events happened within the snapshot phase might be replayed (only at-least-once semantic is promised). For example updating an already updated value in snapshot, or deleting an already deleted entry in snapshot. These replayed binlog events should be handled specially.
-
scanNewlyAddedTableEnabled
public OracleSourceBuilder<T> scanNewlyAddedTableEnabled(boolean scanNewlyAddedTableEnabled)
Whether theOracleSourceBuilder.OracleIncrementalSourceshould scan the newly added tables or not.
-
assignUnboundedChunkFirst
public OracleSourceBuilder<T> assignUnboundedChunkFirst(boolean assignUnboundedChunkFirst)
Whether theOracleSourceBuilder.OracleIncrementalSourceshould assign the unbounded chunks first or not during snapshot reading phase.
-
releaseSnapshotMetadataEnabled
public OracleSourceBuilder<T> releaseSnapshotMetadataEnabled(boolean releaseSnapshotMetadataEnabled)
Whether to release the finished snapshot split metadata from the coordinator after entering the stream phase, to reduce JobManager memory pressure (FLINK-40697).
-
build
public OracleSourceBuilder.OracleIncrementalSource<T> build()
Build theOracleSourceBuilder.OracleIncrementalSource.- Returns:
- a OracleParallelSource with the settings made for this builder.
-
-