Class BinlogOffsetUtils

    • Constructor Detail

      • BinlogOffsetUtils

        public BinlogOffsetUtils()
    • Method Detail

      • initializeEffectiveOffset

        public static BinlogOffset initializeEffectiveOffset​(BinlogOffset offset,
                                                             MySqlConnection connection,
                                                             MySqlSourceConfig mySqlSourceConfig)
        Initialize the binlog offset according to the kind of binlog offset, so that the debezium reader could interpret it and seek the reader to the offset.

        This method will be used in binlog reading phase, when the StatefulTaskContext is being initialized to load the actual effective binlog offset.

        The binlog offset kind will be overridden to BinlogOffsetKind.SPECIFIC after the initialization, as the initialized effective offset describes a specific position in binlog.

        Initialization strategy:

        • EARLIEST: binlog filename = "", position = 0
        • TIMESTAMP: set to earliest, as the current implementation is reading from the earliest offset and drop events earlier than the specified timestamp.
        • LATEST: fetch the current binlog by JDBC
      • isNonStoppingOffset

        public static boolean isNonStoppingOffset​(BinlogOffset binlogOffset)