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 theBufferso that we can get the information without deserializing the serialized data.Notes: Currently, one byte is used to serialize the ordinal of
Buffer.DataTypeinNettyMessage.BufferResponse, so the maximum number of supported data types is 128.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALIGNED_CHECKPOINT_BARRIERALIGNED_CHECKPOINT_BARRIERindicates that this buffer represents a serialized checkpoint barrier of aligned exactly-once checkpoint mode.ALIGNED_WATERMARK_EVENTALIGNED_WATERMARK_EVENTindicates that this buffer represents a serializedWatermarkEvent, which needs to be aligned.DATA_BUFFERDATA_BUFFERindicates that this buffer represents a non-event data buffer.DATA_BUFFER_WITH_CLEAR_ENDDATA_BUFFER_WITH_CLEAR_ENDindicates 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_DATAEND_OF_DATAindicates that there will be no more data buffer in a subpartition.END_OF_PARTITIONEND_OF_PARTITIONmarks a subpartition as fully consumed.END_OF_SEGMENTEND_OF_SEGMENTindicates that a segment is finished in a subpartition.EVENT_BUFFEREVENT_BUFFERindicates that this buffer represents serialized data of an event.NONENONEindicates that there is no buffer.PRIORITIZED_EVENT_BUFFERSame as EVENT_BUFFER, but the event has been prioritized (e.g. it skipped buffers).RECOVERY_COMPLETIONIndicates that this subpartition state is fully recovered (emitted).RECOVERY_METADATAContains the metadata used during a recovery process.TIMEOUTABLE_ALIGNED_CHECKPOINT_BARRIERTIMEOUTABLE_ALIGNED_CHECKPOINT_BARRIERindicates 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.UNALIGNED_WATERMARK_EVENTUNALIGNED_WATERMARK_EVENTindicates that this buffer represents a serializedWatermarkEvent, which does not need to be aligned.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Buffer.DataTypegetDataType(AbstractEvent event, boolean hasPriority)booleanhasPriority()booleanisBlockingUpstream()booleanisBuffer()booleanisEvent()booleanisPartialRecord()booleanrequiresAnnouncement()static Buffer.DataTypevalueOf(String name)Returns the enum constant of this type with the specified name.static Buffer.DataType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NONE
public static final Buffer.DataType NONE
NONEindicates that there is no buffer.
-
DATA_BUFFER
public static final Buffer.DataType DATA_BUFFER
DATA_BUFFERindicates that this buffer represents a non-event data buffer.
-
EVENT_BUFFER
public static final Buffer.DataType EVENT_BUFFER
EVENT_BUFFERindicates that this buffer represents serialized data of an event. Note that this type can be further divided into more fine-grained event types likeALIGNED_CHECKPOINT_BARRIERand 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_BARRIERindicates 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_BARRIERindicates 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_SEGMENTindicates 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_ENDindicates 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_DATAindicates that there will be no more data buffer in a subpartition.
-
END_OF_PARTITION
public static final Buffer.DataType END_OF_PARTITION
END_OF_PARTITIONmarks 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_EVENTindicates that this buffer represents a serializedWatermarkEvent, which needs to be aligned.
-
UNALIGNED_WATERMARK_EVENT
public static final Buffer.DataType UNALIGNED_WATERMARK_EVENT
UNALIGNED_WATERMARK_EVENTindicates that this buffer represents a serializedWatermarkEvent, which does not need to be aligned.
-
-
Method Detail
-
values
public static Buffer.DataType[] 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 (Buffer.DataType c : Buffer.DataType.values()) System.out.println(c);
- 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 nameNullPointerException- 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)
-
-