Class VitessSource.Builder<T>
- java.lang.Object
-
- org.apache.flink.cdc.connectors.vitess.VitessSource.Builder<T>
-
- Enclosing class:
- VitessSource
public static class VitessSource.Builder<T> extends Object
Builder class ofVitessSource.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DebeziumSourceFunction<T>build()VitessSource.Builder<T>columnExcludeList(String... columnExcludeList)An optional, comma-separated list of regular expressions that match the fully-qualified names of columns that should be excluded from change event record values.VitessSource.Builder<T>columnIncludeList(String... columnIncludeList)An optional, comma-separated list of regular expressions that match the fully-qualified names of columns that should be included in change event record values.VitessSource.Builder<T>debeziumProperties(Properties properties)The Debezium Vitess connector properties.VitessSource.Builder<T>decodingPluginName(String name)The name of the Vitess logical decoding plug-in installed on the server.VitessSource.Builder<T>deserializer(DebeziumDeserializationSchema<T> deserializer)The deserializer used to convert from consumedSourceRecord.VitessSource.Builder<T>gtid(String gtid)An optional GTID position for a shard to stream from.VitessSource.Builder<T>hostname(String hostname)Hostname of the VTGate’s VStream server.VitessSource.Builder<T>keyspace(String keyspace)The name of the keyspace (a.k.a database).VitessSource.Builder<T>messageKeyColumns(String[] messageKeyColumns)A semicolon separated list of tables with regular expressions that match table column names.VitessSource.Builder<T>name(String name)Unique name for the connector.VitessSource.Builder<T>password(String password)The password of the Vitess database server (VTGate gRPC).VitessSource.Builder<T>port(int port)Integer port number of the VTGate’s VStream server.VitessSource.Builder<T>schemaNameAdjustmentMode(SchemaAdjustmentMode schemaNameAdjustmentMode)Specifies how schema names should be adjusted for compatibility with the message converter used by the connector.VitessSource.Builder<T>shard(String shard)An optional name of the shard from which to stream the changes.VitessSource.Builder<T>stopOnReshard(Boolean stopOnReshard)Controls Vitess flag stop_on_reshard.VitessSource.Builder<T>tableExcludeList(String... tableExcludeList)An optional, comma-separated list of regular expressions that match fully-qualified table identifiers for tables whose changes you do not want to capture.VitessSource.Builder<T>tableIncludeList(String... tableIncludeList)An optional, comma-separated list of regular expressions that match fully-qualified table identifiers for tables whose changes you want to capture.VitessSource.Builder<T>tabletType(TabletType tabletType)The type of Tablet (hence MySQL) from which to stream the changes: MASTER represents streaming from the master MySQL instance REPLICA represents streaming from the replica slave MySQL instance RDONLY represents streaming from the read-only slave MySQL instance.VitessSource.Builder<T>tombstonesOnDelete(Boolean tombstonesOnDelete)* Controls whether a delete event is followed by a tombstone event.VitessSource.Builder<T>username(String username)The username of the Vitess database server (VTGate gRPC).
-
-
-
Method Detail
-
decodingPluginName
public VitessSource.Builder<T> decodingPluginName(String name)
The name of the Vitess logical decoding plug-in installed on the server. Supported values are decoderbufs
-
hostname
public VitessSource.Builder<T> hostname(String hostname)
Hostname of the VTGate’s VStream server.
-
port
public VitessSource.Builder<T> port(int port)
Integer port number of the VTGate’s VStream server.
-
keyspace
public VitessSource.Builder<T> keyspace(String keyspace)
The name of the keyspace (a.k.a database). If no shard is specified, it reads change events from all shards in the keyspace.
-
shard
public VitessSource.Builder<T> shard(String shard)
An optional name of the shard from which to stream the changes. If not configured, in case of unsharded keyspace, the connector streams changes from the only shard, in case of sharded keyspace, the connector streams changes from all shards in the keyspace. We recommend not configuring it in order to stream from all shards in the keyspace because it has better support for reshard operation. If configured, for example, -80, the connector will stream changes from the -80 shard.
-
gtid
public VitessSource.Builder<T> gtid(String gtid)
An optional GTID position for a shard to stream from. This has to be set together with vitess.shard. If not configured, the connector streams changes from the latest position for the given shard.
-
stopOnReshard
public VitessSource.Builder<T> stopOnReshard(Boolean stopOnReshard)
Controls Vitess flag stop_on_reshard. true - the stream will be stopped after a reshard operation. false - the stream will be automatically migrated for the new shards after a reshard operation. If set to true, you should also consider setting vitess.gtid in the configuration.
-
tombstonesOnDelete
public VitessSource.Builder<T> tombstonesOnDelete(Boolean tombstonesOnDelete)
* Controls whether a delete event is followed by a tombstone event. true - a delete operation is represented by a delete event and a subsequent tombstone event. false - only a delete event is emitted.
-
messageKeyColumns
public VitessSource.Builder<T> messageKeyColumns(String[] messageKeyColumns)
A semicolon separated list of tables with regular expressions that match table column names. The connector maps values in matching columns to key fields in change event records that it sends to Kafka topics. This is useful when a table does not have a primary key, or when you want to order change event records in a Kafka topic according to a field that is not a primary key. Separate entries with semicolons. Insert a colon between the fully-qualified table name and its regular expression. The format is: keyspace-name.table-name:_regexp_;…
-
schemaNameAdjustmentMode
public VitessSource.Builder<T> schemaNameAdjustmentMode(SchemaAdjustmentMode schemaNameAdjustmentMode)
Specifies how schema names should be adjusted for compatibility with the message converter used by the connector. Possible settings: avro replaces the characters that cannot be used in the Avro type name with underscore. none does not apply any adjustment.
-
tabletType
public VitessSource.Builder<T> tabletType(TabletType tabletType)
The type of Tablet (hence MySQL) from which to stream the changes: MASTER represents streaming from the master MySQL instance REPLICA represents streaming from the replica slave MySQL instance RDONLY represents streaming from the read-only slave MySQL instance.
-
username
public VitessSource.Builder<T> username(String username)
The username of the Vitess database server (VTGate gRPC).
-
password
public VitessSource.Builder<T> password(String password)
The password of the Vitess database server (VTGate gRPC).
-
name
public VitessSource.Builder<T> name(String name)
Unique name for the connector. Attempting to register again with the same name will fail. This property is required by all Kafka Connect connectors. Default is "flink".
-
tableIncludeList
public VitessSource.Builder<T> tableIncludeList(String... tableIncludeList)
An optional, comma-separated list of regular expressions that match fully-qualified table identifiers for tables whose changes you want to capture. Any table not included in table.include.list does not have its changes captured. Each identifier is of the form keyspace.tableName. By default, the connector captures changes in every non-system table in each schema whose changes are being captured. Do not also set the table.exclude.list property.
-
tableExcludeList
public VitessSource.Builder<T> tableExcludeList(String... tableExcludeList)
An optional, comma-separated list of regular expressions that match fully-qualified table identifiers for tables whose changes you do not want to capture. Any table not included in table.exclude.list has it changes captured. Each identifier is of the form keyspace.tableName. Do not also set the table.include.list property.
-
columnIncludeList
public VitessSource.Builder<T> columnIncludeList(String... columnIncludeList)
An optional, comma-separated list of regular expressions that match the fully-qualified names of columns that should be included in change event record values. Fully-qualified names for columns are of the form keyspace.tableName.columnName. Do not also set the column.exclude.list property.
-
columnExcludeList
public VitessSource.Builder<T> columnExcludeList(String... columnExcludeList)
An optional, comma-separated list of regular expressions that match the fully-qualified names of columns that should be excluded from change event record values. Fully-qualified names for columns are of the form keyspace.tableName.columnName. Do not also set the column.include.list property.
-
debeziumProperties
public VitessSource.Builder<T> debeziumProperties(Properties properties)
The Debezium Vitess connector properties.
-
deserializer
public VitessSource.Builder<T> deserializer(DebeziumDeserializationSchema<T> deserializer)
The deserializer used to convert from consumedSourceRecord.
-
build
public DebeziumSourceFunction<T> build()
-
-