Class MetadataV2V3SerializerBase
java.lang.Object
org.apache.flink.runtime.checkpoint.metadata.MetadataV2V3SerializerBase
- Direct Known Subclasses:
MetadataV2Serializer,MetadataV3Serializer
Base (De)serializer for checkpoint metadata format version 2 and 3.
The difference between versions 2 and 3 is minor. Version 3 includes operator coordinator state for each operator, and drops some minor unused fields.
Basic checkpoint metadata layout:
+--------------+---------------+-----------------+ | checkpointID | master states | operator states | +--------------+---------------+-----------------+ Master state: +--------------+---------------------+---------+------+---------------+ | magic number | num remaining bytes | version | name | payload bytes | +--------------+---------------------+---------+------+---------------+
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static final classA context that keeps information needed during serialization. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StateObjectCollection<InputChannelStateHandle>deserializeInputChannelStateHandle(DataInputStream dis, MetadataV2V3SerializerBase.DeserializationContext context) protected MasterStateprotected CheckpointMetadatadeserializeMetadata(DataInputStream dis, String externalPointer) protected abstract OperatorStatedeserializeOperatorState(DataInputStream dis, MetadataV2V3SerializerBase.DeserializationContext context) deserializeResultSubpartitionStateHandle(DataInputStream dis, MetadataV2V3SerializerBase.DeserializationContext context) protected OperatorSubtaskStatedeserializeSubtaskState(DataInputStream dis, MetadataV2V3SerializerBase.DeserializationContext context) protected voidserializeInputChannelStateHandle(InputChannelStateHandle inputChannelStateHandle, DataOutputStream dos) protected voidserializeMasterState(MasterState state, DataOutputStream dos) protected voidserializeMetadata(CheckpointMetadata checkpointMetadata, DataOutputStream dos) protected abstract voidserializeOperatorState(OperatorState operatorState, DataOutputStream dos) protected voidserializeResultSubpartitionStateHandle(ResultSubpartitionStateHandle resultSubpartitionStateHandle, DataOutputStream dos) protected voidserializeSubtaskState(OperatorSubtaskState subtaskState, DataOutputStream dos)
-
Constructor Details
-
MetadataV2V3SerializerBase
public MetadataV2V3SerializerBase()
-
-
Method Details
-
serializeMetadata
protected void serializeMetadata(CheckpointMetadata checkpointMetadata, DataOutputStream dos) throws IOException - Throws:
IOException
-
deserializeMetadata
protected CheckpointMetadata deserializeMetadata(DataInputStream dis, @Nullable String externalPointer) throws IOException - Throws:
IOException
-
serializeMasterState
- Throws:
IOException
-
deserializeMasterState
- Throws:
IOException
-
serializeOperatorState
protected abstract void serializeOperatorState(OperatorState operatorState, DataOutputStream dos) throws IOException - Throws:
IOException
-
deserializeOperatorState
protected abstract OperatorState deserializeOperatorState(DataInputStream dis, @Nullable MetadataV2V3SerializerBase.DeserializationContext context) throws IOException - Throws:
IOException
-
serializeSubtaskState
protected void serializeSubtaskState(OperatorSubtaskState subtaskState, DataOutputStream dos) throws IOException - Throws:
IOException
-
deserializeSubtaskState
protected OperatorSubtaskState deserializeSubtaskState(DataInputStream dis, @Nullable MetadataV2V3SerializerBase.DeserializationContext context) throws IOException - Throws:
IOException
-
deserializeResultSubpartitionStateHandle
protected StateObjectCollection<ResultSubpartitionStateHandle> deserializeResultSubpartitionStateHandle(DataInputStream dis, @Nullable MetadataV2V3SerializerBase.DeserializationContext context) throws IOException - Throws:
IOException
-
deserializeInputChannelStateHandle
protected StateObjectCollection<InputChannelStateHandle> deserializeInputChannelStateHandle(DataInputStream dis, @Nullable MetadataV2V3SerializerBase.DeserializationContext context) throws IOException - Throws:
IOException
-
serializeResultSubpartitionStateHandle
protected void serializeResultSubpartitionStateHandle(ResultSubpartitionStateHandle resultSubpartitionStateHandle, DataOutputStream dos) throws IOException - Throws:
IOException
-
serializeInputChannelStateHandle
protected void serializeInputChannelStateHandle(InputChannelStateHandle inputChannelStateHandle, DataOutputStream dos) throws IOException - Throws:
IOException
-