Class StartupOptions
- java.lang.Object
-
- org.apache.flink.cdc.connectors.mysql.table.StartupOptions
-
- All Implemented Interfaces:
Serializable
public final class StartupOptions extends Object implements Serializable
Debezium startup options.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description BinlogOffsetbinlogOffsetStartupModestartupMode
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StartupOptionsearliest()Never to perform snapshot on the monitored database tables upon first startup, just read from the beginning of the binlog.booleanequals(Object o)inthashCode()static StartupOptionsinitial()Performs an initial snapshot on the monitored database tables upon first startup, and continue to read the latest binlog.booleanisSnapshotOnly()booleanisStreamOnly()static StartupOptionslatest()Never to perform snapshot on the monitored database tables upon first startup, just read from the end of the binlog which means only have the changes since the connector was started.static StartupOptionssnapshot()Performs an initial snapshot on the monitored database tables upon first startup, and not read the binlog anymore .static StartupOptionsspecificOffset(String gtidSet)static StartupOptionsspecificOffset(String specificOffsetFile, long specificOffsetPos)Never to perform snapshot on the monitored database tables upon first startup, and directly read binlog from the specified offset.static StartupOptionsspecificOffset(BinlogOffset binlogOffset)static StartupOptionstimestamp(long startupTimestampMillis)Never to perform snapshot on the monitored database tables upon first startup, and directly read binlog from the specified timestamp.
-
-
-
Field Detail
-
startupMode
public final StartupMode startupMode
-
binlogOffset
@Nullable public final BinlogOffset binlogOffset
-
-
Method Detail
-
initial
public static StartupOptions initial()
Performs an initial snapshot on the monitored database tables upon first startup, and continue to read the latest binlog.
-
snapshot
public static StartupOptions snapshot()
Performs an initial snapshot on the monitored database tables upon first startup, and not read the binlog anymore .
-
earliest
public static StartupOptions earliest()
Never to perform snapshot on the monitored database tables upon first startup, just read from the beginning of the binlog. This should be used with care, as it is only valid when the binlog is guaranteed to contain the entire history of the database.
-
latest
public static StartupOptions latest()
Never to perform snapshot on the monitored database tables upon first startup, just read from the end of the binlog which means only have the changes since the connector was started.
-
specificOffset
public static StartupOptions specificOffset(String specificOffsetFile, long specificOffsetPos)
Never to perform snapshot on the monitored database tables upon first startup, and directly read binlog from the specified offset.
-
specificOffset
public static StartupOptions specificOffset(String gtidSet)
-
specificOffset
public static StartupOptions specificOffset(BinlogOffset binlogOffset)
-
timestamp
public static StartupOptions timestamp(long startupTimestampMillis)
Never to perform snapshot on the monitored database tables upon first startup, and directly read binlog from the specified timestamp.The consumer will traverse the binlog from the beginning and ignore change events whose timestamp is smaller than the specified timestamp.
- Parameters:
startupTimestampMillis- timestamp for the startup offsets, as milliseconds from epoch.
-
isStreamOnly
public boolean isStreamOnly()
-
isSnapshotOnly
public boolean isSnapshotOnly()
-
-