Class 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).
    • 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()
      • getTableSchemas

        public Map<io.debezium.relational.TableId,​io.debezium.relational.history.TableChanges.TableChange> getTableSchemas()
        Specified by:
        getTableSchemas in class MySqlSplit
      • getTotalFinishedSplitSize

        public int getTotalFinishedSplitSize()
      • isSuspended

        public boolean isSuspended()
      • isCompletedSplit

        public boolean isCompletedSplit()
      • getTables

        public String getTables()
      • filterOutdatedSplitInfos

        public static MySqlBinlogSplit filterOutdatedSplitInfos​(MySqlBinlogSplit binlogSplit,
                                                                io.debezium.relational.Tables.TableFilter currentTableFilter)
        Filter out the outdated finished splits in MySqlBinlogSplit.

        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)