Enum Buffer.DataType

java.lang.Object
java.lang.Enum<Buffer.DataType>
org.apache.flink.runtime.io.network.buffer.Buffer.DataType
All Implemented Interfaces:
Serializable, Comparable<Buffer.DataType>
Enclosing interface:
Buffer

public static enum Buffer.DataType extends Enum<Buffer.DataType>
Used to identify the type of data contained in the Buffer so that we can get the information without deserializing the serialized data.

Notes: Currently, one byte is used to serialize the ordinal of Buffer.DataType in NettyMessage.BufferResponse, so the maximum number of supported data types is 128.

  • Enum Constant Details

    • NONE

      public static final Buffer.DataType NONE
      NONE indicates that there is no buffer.
    • DATA_BUFFER

      public static final Buffer.DataType DATA_BUFFER
      DATA_BUFFER indicates that this buffer represents a non-event data buffer.
    • EVENT_BUFFER

      public static final Buffer.DataType EVENT_BUFFER
      EVENT_BUFFER indicates that this buffer represents serialized data of an event. Note that this type can be further divided into more fine-grained event types like ALIGNED_CHECKPOINT_BARRIER and etc.
    • PRIORITIZED_EVENT_BUFFER

      public static final Buffer.DataType PRIORITIZED_EVENT_BUFFER
      Same as EVENT_BUFFER, but the event has been prioritized (e.g. it skipped buffers).
    • ALIGNED_CHECKPOINT_BARRIER

      public static final Buffer.DataType ALIGNED_CHECKPOINT_BARRIER
      ALIGNED_CHECKPOINT_BARRIER indicates that this buffer represents a serialized checkpoint barrier of aligned exactly-once checkpoint mode.
    • TIMEOUTABLE_ALIGNED_CHECKPOINT_BARRIER

      public static final Buffer.DataType TIMEOUTABLE_ALIGNED_CHECKPOINT_BARRIER
      TIMEOUTABLE_ALIGNED_CHECKPOINT_BARRIER indicates that this buffer represents a serialized checkpoint barrier of aligned exactly-once checkpoint mode, that can be time-out'ed to an unaligned checkpoint barrier.
    • RECOVERY_COMPLETION

      public static final Buffer.DataType RECOVERY_COMPLETION
      Indicates that this subpartition state is fully recovered (emitted). Further data can be consumed after unblocking.
    • END_OF_SEGMENT

      public static final Buffer.DataType END_OF_SEGMENT
      END_OF_SEGMENT indicates that a segment is finished in a subpartition.
    • DATA_BUFFER_WITH_CLEAR_END

      public static final Buffer.DataType DATA_BUFFER_WITH_CLEAR_END
      DATA_BUFFER_WITH_CLEAR_END indicates that this buffer represents a non-event data buffer, and that at the end of this buffer there is no data cut and split into the next buffer.
    • END_OF_DATA

      public static final Buffer.DataType END_OF_DATA
      END_OF_DATA indicates that there will be no more data buffer in a subpartition.
    • END_OF_PARTITION

      public static final Buffer.DataType END_OF_PARTITION
      END_OF_PARTITION marks a subpartition as fully consumed.
    • RECOVERY_METADATA

      public static final Buffer.DataType RECOVERY_METADATA
      Contains the metadata used during a recovery process.
    • ALIGNED_WATERMARK_EVENT

      public static final Buffer.DataType ALIGNED_WATERMARK_EVENT
      ALIGNED_WATERMARK_EVENT indicates that this buffer represents a serialized WatermarkEvent, which needs to be aligned.
    • UNALIGNED_WATERMARK_EVENT

      public static final Buffer.DataType UNALIGNED_WATERMARK_EVENT
      UNALIGNED_WATERMARK_EVENT indicates that this buffer represents a serialized WatermarkEvent, which does not need to be aligned.
  • Method Details

    • values

      public static Buffer.DataType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      Returns:
      an array containing the constants of this enum type, in the order they are declared
    • valueOf

      public static Buffer.DataType 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
    • isBuffer

      public boolean isBuffer()
    • isEvent

      public boolean isEvent()
    • hasPriority

      public boolean hasPriority()
    • isBlockingUpstream

      public boolean isBlockingUpstream()
    • requiresAnnouncement

      public boolean requiresAnnouncement()
    • isPartialRecord

      public boolean isPartialRecord()
    • getDataType

      public static Buffer.DataType getDataType(AbstractEvent event, boolean hasPriority)