Enum 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---onBinlogSplitUpdated()---> NEWLY_ADDED_ASSIGNING_FINISHED(end)
                  ↑                                                                                                               |
                  |                                                                                                               |
                  |--------------- startAssignNewlyTables() //found newly added tables, assign newly added tables ----------------|
     
    • 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 name
        NullPointerException - if the argument is null
      • getStatusCode

        public int getStatusCode()
      • startAssignNewlyTables

        public AssignerStatus startAssignNewlyTables()
      • 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.