Class MySqlBinlogSplit
- java.lang.Object
-
- org.apache.flink.cdc.connectors.mysql.source.split.MySqlSplit
-
- org.apache.flink.cdc.connectors.mysql.source.split.MySqlBinlogSplit
-
- All Implemented Interfaces:
org.apache.flink.api.connector.source.SourceSplit
public class MySqlBinlogSplit extends MySqlSplit
The split to describe the binlog of MySql table(s).
-
-
Field Summary
-
Fields inherited from class org.apache.flink.cdc.connectors.mysql.source.split.MySqlSplit
splitId
-
-
Constructor Summary
Constructors Constructor Description MySqlBinlogSplit(String splitId, BinlogOffset startingOffset, BinlogOffset endingOffset, List<FinishedSnapshotSplitInfo> finishedSnapshotSplitInfos, Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange> tableSchemas, int totalFinishedSplitSize)MySqlBinlogSplit(String splitId, BinlogOffset startingOffset, BinlogOffset endingOffset, List<FinishedSnapshotSplitInfo> finishedSnapshotSplitInfos, Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange> tableSchemas, int totalFinishedSplitSize, boolean isSuspended)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MySqlBinlogSplitappendFinishedSplitInfos(MySqlBinlogSplit binlogSplit, List<FinishedSnapshotSplitInfo> splitInfos)booleanequals(Object o)static MySqlBinlogSplitfillTableSchemas(MySqlBinlogSplit binlogSplit, Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange> tableSchemas)static MySqlBinlogSplitfilterOutdatedSplitInfos(MySqlBinlogSplit binlogSplit, io.debezium.relational.Tables.TableFilter currentTableFilter)Filter out the outdated finished splits inMySqlBinlogSplit.BinlogOffsetgetEndingOffset()List<FinishedSnapshotSplitInfo>getFinishedSnapshotSplitInfos()BinlogOffsetgetStartingOffset()StringgetTables()Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange>getTableSchemas()intgetTotalFinishedSplitSize()inthashCode()booleanisCompletedSplit()booleanisSuspended()static MySqlBinlogSplittoNormalBinlogSplit(MySqlBinlogSplit suspendedBinlogSplit, int totalFinishedSplitSize)StringtoString()static MySqlBinlogSplittoSuspendedBinlogSplit(MySqlBinlogSplit normalBinlogSplit)-
Methods inherited from class org.apache.flink.cdc.connectors.mysql.source.split.MySqlSplit
asBinlogSplit, asSnapshotSplit, isBinlogSplit, isSnapshotSplit, splitId
-
-
-
-
Constructor Detail
-
MySqlBinlogSplit
public MySqlBinlogSplit(String splitId, BinlogOffset startingOffset, BinlogOffset endingOffset, List<FinishedSnapshotSplitInfo> finishedSnapshotSplitInfos, Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange> tableSchemas, int totalFinishedSplitSize, boolean isSuspended)
-
MySqlBinlogSplit
public MySqlBinlogSplit(String splitId, BinlogOffset startingOffset, BinlogOffset endingOffset, List<FinishedSnapshotSplitInfo> finishedSnapshotSplitInfos, Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange> tableSchemas, int totalFinishedSplitSize)
-
-
Method Detail
-
getStartingOffset
public BinlogOffset getStartingOffset()
-
getEndingOffset
public BinlogOffset getEndingOffset()
-
getFinishedSnapshotSplitInfos
public List<FinishedSnapshotSplitInfo> getFinishedSnapshotSplitInfos()
-
getTableSchemas
public Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange> getTableSchemas()
- Specified by:
getTableSchemasin classMySqlSplit
-
getTotalFinishedSplitSize
public int getTotalFinishedSplitSize()
-
isSuspended
public boolean isSuspended()
-
isCompletedSplit
public boolean isCompletedSplit()
-
getTables
public String getTables()
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classMySqlSplit
-
hashCode
public int hashCode()
- Overrides:
hashCodein classMySqlSplit
-
appendFinishedSplitInfos
public static MySqlBinlogSplit appendFinishedSplitInfos(MySqlBinlogSplit binlogSplit, List<FinishedSnapshotSplitInfo> splitInfos)
-
filterOutdatedSplitInfos
public static MySqlBinlogSplit filterOutdatedSplitInfos(MySqlBinlogSplit binlogSplit, io.debezium.relational.Tables.TableFilter currentTableFilter)
Filter out the outdated finished splits inMySqlBinlogSplit.When restore from a checkpoint, the finished split infos may contain some splits from the deleted tables. We need to remove these splits from the total finished split infos and update the size, while also removing the outdated tables from the table schemas of binlog split.
-
fillTableSchemas
public static MySqlBinlogSplit fillTableSchemas(MySqlBinlogSplit binlogSplit, Map<io.debezium.relational.TableId,io.debezium.relational.history.TableChanges.TableChange> tableSchemas)
-
toNormalBinlogSplit
public static MySqlBinlogSplit toNormalBinlogSplit(MySqlBinlogSplit suspendedBinlogSplit, int totalFinishedSplitSize)
-
toSuspendedBinlogSplit
public static MySqlBinlogSplit toSuspendedBinlogSplit(MySqlBinlogSplit normalBinlogSplit)
-
-