@NotThreadSafe public final class MySqlConnectorTask extends BaseSourceTask
MySqlConnector| Modifier and Type | Field and Description |
|---|---|
private MySqlJdbcContext |
connectionContext |
private org.slf4j.Logger |
logger |
private ChainedReader |
readers |
private MySqlTaskContext |
taskContext |
| Constructor and Description |
|---|
MySqlConnectorTask()
Create an instance of the log reader that uses Kafka to store database schema history and the
default topic selector of "<serverName>.<databaseName>.<tableName>"
for
data and "<serverName>" for metadata. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
completeReaders()
|
protected String |
earliestBinlogFilename()
Determine the earliest binlog filename that is still available in the server.
|
protected Iterable<Field> |
getAllConfigurationFields() |
protected boolean |
isBinlogAvailable()
Determine whether the binlog position as set on the
SourceInfo is available in the
server. |
protected boolean |
isRowBinlogEnabled()
Determine whether the MySQL server has the row-level binlog enabled.
|
List<org.apache.kafka.connect.source.SourceRecord> |
poll() |
void |
start(Configuration config) |
void |
stop() |
String |
version() |
getPreviousOffset, startprivate final org.slf4j.Logger logger
private volatile MySqlTaskContext taskContext
private volatile MySqlJdbcContext connectionContext
private volatile ChainedReader readers
public MySqlConnectorTask()
default topic selector of "<serverName>.<databaseName>.<tableName>"
for
data and "<serverName>" for metadata.public String version()
public void start(Configuration config)
start in class BaseSourceTaskpublic List<org.apache.kafka.connect.source.SourceRecord> poll() throws InterruptedException
poll in class org.apache.kafka.connect.source.SourceTaskInterruptedExceptionpublic void stop()
stop in interface org.apache.kafka.connect.connector.Taskstop in class org.apache.kafka.connect.source.SourceTaskprotected Iterable<Field> getAllConfigurationFields()
getAllConfigurationFields in class BaseSourceTaskprotected void completeReaders()
protected boolean isBinlogAvailable()
SourceInfo is available in the
server.true if the server has the binlog coordinates, or false otherwiseprotected String earliestBinlogFilename()
protected boolean isRowBinlogEnabled()
true if the server's binlog_format is set to ROW, or false otherwiseCopyright © 2018 JBoss by Red Hat. All rights reserved.