Enum AssignerStatus
- java.lang.Object
-
- java.lang.Enum<AssignerStatus>
-
- org.apache.flink.cdc.connectors.base.source.assigner.AssignerStatus
-
- All Implemented Interfaces:
Serializable,Comparable<AssignerStatus>
public enum AssignerStatus extends Enum<AssignerStatus>
The state of split assigner finite state machine, tips: we use word status instead of word state to avoid conflict with Flink state keyword. The assigner finite state machine goes this way.INITIAL_ASSIGNING(start) | | onFinish() | ↓ INITIAL_ASSIGNING_FINISHED(end) | | startAssignNewlyTables() // found newly added tables, assign newly added tables | ↓ NEWLY_ADDED_ASSIGNING ---onFinish()--→ NEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED---onStreamSplitUpdated()---> NEWLY_ADDED_ASSIGNING_FINISHED(end) ↑ | | | |--------------- startAssignNewlyTables() //found newly added tables, assign newly added tables ----------------|
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INITIAL_ASSIGNINGINITIAL_ASSIGNING_FINISHEDNEWLY_ADDED_ASSIGNINGNEWLY_ADDED_ASSIGNING_FINISHEDNEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AssignerStatusfromStatusCode(int statusCode)Gets theAssignerStatusfrom status code.abstract AssignerStatusgetNextStatus()intgetStatusCode()static booleanisAssigningFinished(AssignerStatus assignerStatus)Returns whether the split assigner has assigned all splits, which indicates it can assign splits for newly added tables or not.static booleanisAssigningSnapshotSplits(AssignerStatus assignerStatus)Returns whether the split assigner is assigning snapshot splits.static booleanisInitialAssigningFinished(AssignerStatus assignerStatus)Returns whether the split assigner has finished its initial tables assignment.static booleanisNewlyAddedAssigning(AssignerStatus assignerStatus)static booleanisNewlyAddedAssigningFinished(AssignerStatus assignerStatus)Returns whether the split assigner has finished its newly added tables assignment.static booleanisNewlyAddedAssigningSnapshotFinished(AssignerStatus assignerStatus)Returns whether the split assigner has finished its newly added snapshot splits assignment.static booleanisSnapshotAssigningFinished(AssignerStatus assignerStatus)Returns whether the split assigner has assigned all snapshot splits, which indicates there is no more snapshot splits and all records of splits have been completely processed in the pipeline.AssignerStatusonFinish()AssignerStatusonStreamSplitUpdated()AssignerStatusstartAssignNewlyTables()static AssignerStatusvalueOf(String name)Returns the enum constant of this type with the specified name.static AssignerStatus[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INITIAL_ASSIGNING
public static final AssignerStatus INITIAL_ASSIGNING
-
INITIAL_ASSIGNING_FINISHED
public static final AssignerStatus INITIAL_ASSIGNING_FINISHED
-
NEWLY_ADDED_ASSIGNING
public static final AssignerStatus NEWLY_ADDED_ASSIGNING
-
NEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED
public static final AssignerStatus NEWLY_ADDED_ASSIGNING_SNAPSHOT_FINISHED
-
NEWLY_ADDED_ASSIGNING_FINISHED
public static final AssignerStatus NEWLY_ADDED_ASSIGNING_FINISHED
-
-
Method Detail
-
values
public static AssignerStatus[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AssignerStatus c : AssignerStatus.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AssignerStatus valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getStatusCode
public int getStatusCode()
-
getNextStatus
public abstract AssignerStatus getNextStatus()
-
onFinish
public AssignerStatus onFinish()
-
startAssignNewlyTables
public AssignerStatus startAssignNewlyTables()
-
onStreamSplitUpdated
public AssignerStatus onStreamSplitUpdated()
-
fromStatusCode
public static AssignerStatus fromStatusCode(int statusCode)
Gets theAssignerStatusfrom status code.
-
isSnapshotAssigningFinished
public static boolean isSnapshotAssigningFinished(AssignerStatus assignerStatus)
Returns whether the split assigner has assigned all snapshot splits, which indicates there is no more snapshot splits and all records of splits have been completely processed in the pipeline.
-
isAssigningFinished
public static boolean isAssigningFinished(AssignerStatus assignerStatus)
Returns whether the split assigner has assigned all splits, which indicates it can assign splits for newly added tables or not.
-
isAssigningSnapshotSplits
public static boolean isAssigningSnapshotSplits(AssignerStatus assignerStatus)
Returns whether the split assigner is assigning snapshot splits.
-
isInitialAssigningFinished
public static boolean isInitialAssigningFinished(AssignerStatus assignerStatus)
Returns whether the split assigner has finished its initial tables assignment.
-
isNewlyAddedAssigningFinished
public static boolean isNewlyAddedAssigningFinished(AssignerStatus assignerStatus)
Returns whether the split assigner has finished its newly added tables assignment.
-
isNewlyAddedAssigningSnapshotFinished
public static boolean isNewlyAddedAssigningSnapshotFinished(AssignerStatus assignerStatus)
Returns whether the split assigner has finished its newly added snapshot splits assignment.
-
isNewlyAddedAssigning
public static boolean isNewlyAddedAssigning(AssignerStatus assignerStatus)
-
-