@PublicEvolving public class MySqlSourceBuilder<T> extends Object
MySqlSource to make it easier for the users to construct a MySqlSource.
MySqlSource
.<String>builder()
.hostname("localhost")
.port(3306)
.databaseList("mydb")
.tableList("mydb.users")
.username(username)
.password(password)
.serverId(5400)
.deserializer(new JsonDebeziumDeserializationSchema())
.build();
Check the Java docs of each individual method to learn more about the settings to build a
MySqlSource.
| Constructor and Description |
|---|
MySqlSourceBuilder() |
| Modifier and Type | Method and Description |
|---|---|
MySqlSource<T> |
build()
Build the
MySqlSource. |
MySqlSourceBuilder<T> |
connectionPoolSize(int connectionPoolSize)
The connection pool size.
|
MySqlSourceBuilder<T> |
connectMaxRetries(int connectMaxRetries)
The max retry times to get connection.
|
MySqlSourceBuilder<T> |
connectTimeout(java.time.Duration connectTimeout)
The maximum time that the connector should wait after trying to connect to the MySQL database
server before timing out.
|
MySqlSourceBuilder<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.
|
MySqlSourceBuilder<T> |
debeziumProperties(Properties properties)
The Debezium MySQL connector properties.
|
MySqlSourceBuilder<T> |
deserializer(com.ververica.cdc.debezium.DebeziumDeserializationSchema<T> deserializer)
The deserializer used to convert from consumed
SourceRecord. |
MySqlSourceBuilder<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.
|
MySqlSourceBuilder<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.
|
MySqlSourceBuilder<T> |
fetchSize(int fetchSize)
The maximum fetch size for per poll when read table snapshot.
|
MySqlSourceBuilder<T> |
heartbeatInterval(java.time.Duration heartbeatInterval)
The interval of heartbeat event.
|
MySqlSourceBuilder<T> |
hostname(String hostname) |
MySqlSourceBuilder<T> |
includeSchemaChanges(boolean includeSchemaChanges)
Whether the
MySqlSource should output the schema changes or not. |
MySqlSourceBuilder<T> |
jdbcProperties(Properties jdbcProperties)
Custom properties that will overwrite the default JDBC connection URL.
|
MySqlSourceBuilder<T> |
password(String password)
Password to use when connecting to the MySQL database server.
|
MySqlSourceBuilder<T> |
port(int port)
Integer port number of the MySQL database server.
|
MySqlSourceBuilder<T> |
scanNewlyAddedTableEnabled(boolean scanNewlyAddedTableEnabled)
Whether the
MySqlSource should scan the newly added tables or not. |
MySqlSourceBuilder<T> |
serverId(String serverId)
A numeric ID or a numeric ID range of this database client, The numeric ID syntax is like
'5400', the numeric ID range syntax is like '5400-5408', The numeric ID range syntax is
required when 'scan.incremental.snapshot.enabled' enabled.
|
MySqlSourceBuilder<T> |
serverTimeZone(String timeZone)
The session time zone in database server, e.g.
|
MySqlSourceBuilder<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.
|
MySqlSourceBuilder<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.
|
MySqlSourceBuilder<T> |
startupOptions(StartupOptions startupOptions)
Specifies the startup options.
|
MySqlSourceBuilder<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.
|
MySqlSourceBuilder<T> |
username(String username)
Name of the MySQL database to use when connecting to the MySQL database server.
|
public MySqlSourceBuilder<T> hostname(String hostname)
public MySqlSourceBuilder<T> port(int port)
public MySqlSourceBuilder<T> databaseList(String... databaseList)
public MySqlSourceBuilder<T> tableList(String... tableList)
<databaseName>.<tableName>.public MySqlSourceBuilder<T> username(String username)
public MySqlSourceBuilder<T> password(String password)
public MySqlSourceBuilder<T> serverId(String serverId)
public MySqlSourceBuilder<T> serverTimeZone(String timeZone)
public MySqlSourceBuilder<T> splitSize(int splitSize)
public MySqlSourceBuilder<T> splitMetaGroupSize(int splitMetaGroupSize)
public MySqlSourceBuilder<T> distributionFactorUpper(double distributionFactorUpper)
public MySqlSourceBuilder<T> distributionFactorLower(double distributionFactorLower)
public MySqlSourceBuilder<T> fetchSize(int fetchSize)
public MySqlSourceBuilder<T> connectTimeout(java.time.Duration connectTimeout)
public MySqlSourceBuilder<T> connectMaxRetries(int connectMaxRetries)
public MySqlSourceBuilder<T> connectionPoolSize(int connectionPoolSize)
public MySqlSourceBuilder<T> includeSchemaChanges(boolean includeSchemaChanges)
MySqlSource should output the schema changes or not.public MySqlSourceBuilder<T> scanNewlyAddedTableEnabled(boolean scanNewlyAddedTableEnabled)
MySqlSource should scan the newly added tables or not.public MySqlSourceBuilder<T> startupOptions(StartupOptions startupOptions)
public MySqlSourceBuilder<T> jdbcProperties(Properties jdbcProperties)
public MySqlSourceBuilder<T> debeziumProperties(Properties properties)
public MySqlSourceBuilder<T> deserializer(com.ververica.cdc.debezium.DebeziumDeserializationSchema<T> deserializer)
SourceRecord.public MySqlSourceBuilder<T> heartbeatInterval(java.time.Duration heartbeatInterval)
public MySqlSource<T> build()
MySqlSource.Copyright © 2022 The Apache Software Foundation. All rights reserved.