Package io.debezium.connector.mariadb
Class SourceInfo
java.lang.Object
io.debezium.connector.AbstractSourceInfo
io.debezium.connector.common.BaseSourceInfo
io.debezium.connector.binlog.BinlogSourceInfo
io.debezium.connector.mariadb.SourceInfo
Information about the source, which includes the position in the binary transaction log.
The
source partition information describes the database whose
log is being consumed. Typically, the database is identified by the host address and port number of the
MariaDB server and the name of the database. Here's an example JSON representation:
{
"server": "production-server"
}
The offset includes the binlog filename, the position of the first event
in the transaction log, the number of events to skip on restart,
and the number of rows to skip. An example:
{
"server_id": 112233,
"ts_ms": 123456789,
"gtid": "0-1-3",
"file": "binlog.000003",
"pos": 990,
"event": 0,
"row": 0,
"snapshot": true
}
The "snapshot" field only appears in offsets produced during the snapshot phase. The "ts_ms" field
contains the milliseconds since Unix epoch (since Jan 1 1970) of the MariaDB event.
Each change event Envelope also contains a source struct that contains
the MariaDB information about that specific event, including a mixture of fields from the binary log filename and
position where the event can be found, GTID details, etc. Like with the offset, the "snapshot" field will
only appear for events produced during the snapshot phase.
Here's a JSON example of the source metadata for an event:
{
"name": "production-server",
"server_id": 112233,
"ts_ms": 123456789,
"gtid": "0-1-3",
"file": "binlog.000003",
"pos": 1081,
"row": 0,
"snapshot": true,
"thread": 1,
"db": "inventory",
"table": "products"
}
- Author:
- Chris Cranford
-
Field Summary
Fields inherited from class io.debezium.connector.binlog.BinlogSourceInfo
BINLOG_FILENAME_OFFSET_KEY, BINLOG_POSITION_OFFSET_KEY, BINLOG_ROW_IN_EVENT_OFFSET_KEY, GTID_KEY, QUERY_KEY, SERVER_ID_KEY, THREAD_KEYFields inherited from class io.debezium.connector.common.BaseSourceInfo
snapshotRecordFields inherited from class io.debezium.connector.AbstractSourceInfo
COLLECTION_NAME_KEY, DATABASE_NAME_KEY, DEBEZIUM_CONNECTOR_KEY, DEBEZIUM_VERSION_KEY, SCHEMA_NAME_KEY, SEQUENCE_KEY, SERVER_NAME_KEY, SNAPSHOT_KEY, TABLE_NAME_KEY, TIMESTAMP_KEY, TIMESTAMP_NS_KEY, TIMESTAMP_US_KEY -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class io.debezium.connector.binlog.BinlogSourceInfo
binlogFilename, binlogPosition, createDocumentFromOffset, database, databaseEvent, getCurrentBinlogFilename, getCurrentBinlogPosition, getCurrentGtid, getCurrentRowNumber, getQuery, getServerId, getThreadId, setBinlogPosition, setBinlogServerId, setBinlogThread, setEventPosition, setQuery, setRowNumber, setSourceTime, startGtid, table, tableEvent, tableEvent, timestamp, toStringMethods inherited from class io.debezium.connector.common.BaseSourceInfo
isSnapshot, setSnapshot, snapshotMethods inherited from class io.debezium.connector.AbstractSourceInfo
schema, sequence, serverName, struct, structMaker
-
Constructor Details
-
SourceInfo
-