Class StartupOptions
- java.lang.Object
-
- org.apache.flink.cdc.connectors.base.options.StartupOptions
-
- All Implemented Interfaces:
Serializable
public final class StartupOptions extends Object implements Serializable
Flink CDC Connector startup options.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description Map<String,String>offsetStringspecificOffsetFileIntegerspecificOffsetPosStartupModestartupModeLongstartupTimestampMillis
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StartupOptionscommitted()Never to perform snapshot on the monitored database tables upon first startup, just read from the previous committed posistion of the change log which means only have the changes since the connector last stopped.static StartupOptionsearliest()Never to perform snapshot on the monitored database tables upon first startup, just read from the beginning of the change log.booleanequals(Object o)Map<String,String>getOffset()inthashCode()static StartupOptionsinitial()Performs an initial snapshot on the monitored database tables upon first startup, and continue to read the latest change log.booleanisSnapshotOnly()booleanisStreamOnly()static StartupOptionslatest()Never to perform snapshot on the monitored database tables upon first startup, just read from the end of the change log 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 change log anymore .static StartupOptionsspecificOffset(String specificOffsetFile, int specificOffsetPos)Never to perform snapshot on the monitored database tables upon first startup, and directly read change log from the specified offset.static StartupOptionsspecificOffset(Map<String,String> offset)static StartupOptionstimestamp(long startupTimestampMillis)Never to perform snapshot on the monitored database tables upon first startup, and directly read change log from the specified timestamp.
-
-
-
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 change log.
-
snapshot
public static StartupOptions snapshot()
Performs an initial snapshot on the monitored database tables upon first startup, and not read the change log 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 change log. This should be used with care, as it is only valid when the change log 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 change log which means only have the changes since the connector was started.
-
committed
public static StartupOptions committed()
Never to perform snapshot on the monitored database tables upon first startup, just read from the previous committed posistion of the change log which means only have the changes since the connector last stopped.
-
specificOffset
public static StartupOptions specificOffset(String specificOffsetFile, int specificOffsetPos)
Never to perform snapshot on the monitored database tables upon first startup, and directly read change log from the specified offset.
-
specificOffset
public static StartupOptions specificOffset(Map<String,String> offset)
-
timestamp
public static StartupOptions timestamp(long startupTimestampMillis)
Never to perform snapshot on the monitored database tables upon first startup, and directly read change log from the specified timestamp.The consumer will traverse the change log 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()
-
-