Class MetadataV2V3SerializerBase
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.metadata.MetadataV2V3SerializerBase
-
- Direct Known Subclasses:
MetadataV2Serializer
,MetadataV3Serializer
@Internal public abstract class MetadataV2V3SerializerBase extends Object
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 Classes Modifier and Type Class Description protected static class
MetadataV2V3SerializerBase.DeserializationContext
A context that keeps information needed during serialization.
-
Constructor Summary
Constructors Constructor Description MetadataV2V3SerializerBase()
-
Method Summary
-
-
-
Method Detail
-
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
protected void serializeMasterState(MasterState state, DataOutputStream dos) throws IOException
- Throws:
IOException
-
deserializeMasterState
protected MasterState deserializeMasterState(DataInputStream dis) throws IOException
- 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
-
-