public class SourceRecordUtils extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
SCHEMA_CHANGE_EVENT_KEY_NAME |
| 限定符和类型 | 方法和说明 |
|---|---|
static Long |
getFetchTimestamp(org.apache.kafka.connect.source.SourceRecord record)
The field `ts_ms` in
SourceRecord data struct is the time when the record fetched by
debezium reader, use it as the process time in Source. |
static io.debezium.relational.history.HistoryRecord |
getHistoryRecord(org.apache.kafka.connect.source.SourceRecord schemaRecord) |
static Long |
getMessageTimestamp(org.apache.kafka.connect.source.SourceRecord record)
Return the timestamp when the change event is produced in MySQL.
|
static Object[] |
getSplitKey(org.apache.flink.table.types.logical.RowType splitBoundaryType,
org.apache.kafka.connect.source.SourceRecord dataRecord,
io.debezium.util.SchemaNameAdjuster nameAdjuster) |
static io.debezium.relational.TableId |
getTableId(org.apache.kafka.connect.source.SourceRecord dataRecord) |
static boolean |
isDataChangeRecord(org.apache.kafka.connect.source.SourceRecord record) |
static boolean |
isEndWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record) |
static boolean |
isHighWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record) |
static boolean |
isLowWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record) |
static boolean |
isSchemaChangeEvent(org.apache.kafka.connect.source.SourceRecord sourceRecord) |
static boolean |
isWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record) |
static List<org.apache.kafka.connect.source.SourceRecord> |
normalizedSplitRecords(SnapshotSplit snapshotSplit,
List<org.apache.kafka.connect.source.SourceRecord> sourceRecords,
io.debezium.util.SchemaNameAdjuster nameAdjuster)
Normalize the records of snapshot split which represents the split records state on high
watermark. data input: [low watermark event] [snapshot events ] [high watermark event]
[binlog events] [binlog-end event] data output: [low watermark event] [normalized events]
[high watermark event]
|
static Object[] |
rowToArray(ResultSet rs,
int size)
Converts a
ResultSet row to an array of Objects. |
static boolean |
splitKeyRangeContains(Object[] key,
Object[] splitKeyStart,
Object[] splitKeyEnd)
Returns the specific key contains in the split key range or not.
|
public static Object[] rowToArray(ResultSet rs, int size) throws SQLException
ResultSet row to an array of Objects.SQLExceptionpublic static boolean isWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record)
public static boolean isLowWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record)
public static boolean isHighWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record)
public static boolean isEndWatermarkEvent(org.apache.kafka.connect.source.SourceRecord record)
public static Long getMessageTimestamp(org.apache.kafka.connect.source.SourceRecord record)
The field `source.ts_ms` in SourceRecord data struct is the time when the change
event is operated in MySQL.
public static Long getFetchTimestamp(org.apache.kafka.connect.source.SourceRecord record)
SourceRecord data struct is the time when the record fetched by
debezium reader, use it as the process time in Source.public static boolean isSchemaChangeEvent(org.apache.kafka.connect.source.SourceRecord sourceRecord)
public static boolean isDataChangeRecord(org.apache.kafka.connect.source.SourceRecord record)
public static io.debezium.relational.TableId getTableId(org.apache.kafka.connect.source.SourceRecord dataRecord)
public static Object[] getSplitKey(org.apache.flink.table.types.logical.RowType splitBoundaryType, org.apache.kafka.connect.source.SourceRecord dataRecord, io.debezium.util.SchemaNameAdjuster nameAdjuster)
public static boolean splitKeyRangeContains(Object[] key, Object[] splitKeyStart, Object[] splitKeyEnd)
public static io.debezium.relational.history.HistoryRecord getHistoryRecord(org.apache.kafka.connect.source.SourceRecord schemaRecord)
throws IOException
IOExceptionpublic static List<org.apache.kafka.connect.source.SourceRecord> normalizedSplitRecords(SnapshotSplit snapshotSplit, List<org.apache.kafka.connect.source.SourceRecord> sourceRecords, io.debezium.util.SchemaNameAdjuster nameAdjuster)
Copyright © 2022 10MG. All rights reserved.