Package org.apache.beam.io.debezium
Class DebeziumIO.ConnectorConfiguration
java.lang.Object
org.apache.beam.io.debezium.DebeziumIO.ConnectorConfiguration
- All Implemented Interfaces:
Serializable
- Enclosing class:
DebeziumIO
public abstract static class DebeziumIO.ConnectorConfiguration
extends Object
implements Serializable
A POJO describing a Debezium configuration.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate()
Creates a ConnectorConfiguration.Configuration Map Getter.withConnectionProperties
(Map<String, String> connectionProperties) Sets a custom property to be used within the connection to your database.withConnectionProperties
(ValueProvider<Map<String, String>> connectionProperties) Sets a custom property to be used within the connection to your database.withConnectionProperty
(String key, String value) Sets a custom property to be used within the connection to your database.withConnectorClass
(Class<?> connectorClass) Applies the connectorClass to be used to connect to your database.withConnectorClass
(ValueProvider<Class<?>> connectorClass) Sets the connectorClass to be used to connect to your database.withHostName
(String hostName) Sets the host name to be used on the database.withHostName
(ValueProvider<String> hostName) Sets the host name to be used on the database.withPassword
(String password) Sets the password to connect to your database.withPassword
(ValueProvider<String> password) Sets the password to connect to your database.Sets the port on which your database is listening.withPort
(ValueProvider<String> port) Sets the port on which your database is listening.withSourceConnector
(ValueProvider<org.apache.kafka.connect.source.SourceConnector> sourceConnector) withSourceConnector
(org.apache.kafka.connect.source.SourceConnector sourceConnector) Sets theSourceConnector
to be used.withUsername
(String username) Sets the username to connect to your database.withUsername
(ValueProvider<String> username) Sets the username to connect to your database.
-
Constructor Details
-
ConnectorConfiguration
public ConnectorConfiguration()
-
-
Method Details
-
create
Creates a ConnectorConfiguration.- Returns:
DebeziumIO.ConnectorConfiguration
-
withConnectorClass
Applies the connectorClass to be used to connect to your database.Currently supported connectors are:
-
invalid reference
io.debezium.connector.mysql.MySqlConnector
-
invalid reference
io.debezium.connector.postgresql.PostgresConnector
-
invalid reference
io.debezium.connector.sqlserver.SqlServerConnector
- Parameters:
connectorClass
- Any of the supported connectors.- Returns:
DebeziumIO.ConnectorConfiguration
-
-
withConnectorClass
Sets the connectorClass to be used to connect to your database. It cannot be null.Currently supported connectors are:
-
invalid reference
io.debezium.connector.mysql.MySqlConnector
-
invalid reference
io.debezium.connector.postgresql.PostgresConnector
-
invalid reference
io.debezium.connector.sqlserver.SqlServerConnector
- Parameters:
connectorClass
- (as ValueProvider)- Returns:
DebeziumIO.ConnectorConfiguration
-
-
withHostName
Sets the host name to be used on the database. It cannot be null.- Parameters:
hostName
- The hostname of your database.- Returns:
DebeziumIO.ConnectorConfiguration
-
withHostName
Sets the host name to be used on the database. It cannot be null.- Parameters:
hostName
- The hostname of your database (as ValueProvider).- Returns:
DebeziumIO.ConnectorConfiguration
-
withPort
Sets the port on which your database is listening. It cannot be null.- Parameters:
port
- The port to be used to connect to your database (as ValueProvider).- Returns:
DebeziumIO.ConnectorConfiguration
-
withPort
Sets the port on which your database is listening. It cannot be null.- Parameters:
port
- The port to be used to connect to your database.- Returns:
DebeziumIO.ConnectorConfiguration
-
withUsername
Sets the username to connect to your database. It cannot be null.- Parameters:
username
- Database username- Returns:
DebeziumIO.ConnectorConfiguration
-
withUsername
Sets the username to connect to your database. It cannot be null.- Parameters:
username
- (as ValueProvider).- Returns:
DebeziumIO.ConnectorConfiguration
-
withPassword
Sets the password to connect to your database. It cannot be null.- Parameters:
password
- Database password- Returns:
DebeziumIO.ConnectorConfiguration
-
withPassword
Sets the password to connect to your database. It cannot be null.- Parameters:
password
- (as ValueProvider).- Returns:
DebeziumIO.ConnectorConfiguration
-
withConnectionProperties
public DebeziumIO.ConnectorConfiguration withConnectionProperties(Map<String, String> connectionProperties) Sets a custom property to be used within the connection to your database.You may use this to set special configurations such as:
- slot.name
- database.dbname
- database.server.id
- ...
- Parameters:
connectionProperties
- Properties (Key, Value) Map- Returns:
DebeziumIO.ConnectorConfiguration
-
withConnectionProperties
public DebeziumIO.ConnectorConfiguration withConnectionProperties(ValueProvider<Map<String, String>> connectionProperties) Sets a custom property to be used within the connection to your database.You may use this to set special configurations such as:
- slot.name
- database.dbname
- database.server.id
- ...
- Parameters:
connectionProperties
- (as ValueProvider).- Returns:
DebeziumIO.ConnectorConfiguration
-
withConnectionProperty
Sets a custom property to be used within the connection to your database.You may use this to set special configurations such as:
- slot.name
- database.dbname
- database.server.id
- ...
- Parameters:
key
- Property namevalue
- Property value- Returns:
DebeziumIO.ConnectorConfiguration
-
withSourceConnector
public DebeziumIO.ConnectorConfiguration withSourceConnector(org.apache.kafka.connect.source.SourceConnector sourceConnector) Sets theSourceConnector
to be used. It cannot be null.- Parameters:
sourceConnector
- Any supported connector- Returns:
DebeziumIO.ConnectorConfiguration
-
withSourceConnector
public DebeziumIO.ConnectorConfiguration withSourceConnector(ValueProvider<org.apache.kafka.connect.source.SourceConnector> sourceConnector) -
getConfigurationMap
Configuration Map Getter.- Returns:
- Configuration Map.
-