@Internal public class MetadataV3Serializer extends MetadataV2V3SerializerBase implements MetadataSerializer
Compared to format version 2, this drops some unused fields and introduces operator coordinator state.
See MetadataV2V3SerializerBase
for a description of the format layout.
MetadataV2V3SerializerBase.DeserializationContext
Modifier and Type | Field and Description |
---|---|
static MetadataV3Serializer |
INSTANCE
The singleton instance of the serializer.
|
static int |
VERSION
The metadata format version.
|
deserializeMasterState, deserializeMetadata, deserializeSubtaskState, serializeMasterState, serializeMetadata
public static final int VERSION
public static final MetadataV3Serializer INSTANCE
public int getVersion()
Versioned
getVersion
in interface Versioned
public void serialize(CheckpointMetadata checkpointMetadata, DataOutputStream dos) throws IOException
MetadataSerializer
serialize
in interface MetadataSerializer
IOException
- Serialization failures are forwardedpublic CheckpointMetadata deserialize(DataInputStream dis, ClassLoader classLoader, String externalPointer) throws IOException
MetadataSerializer
deserialize
in interface MetadataSerializer
dis
- Input stream to deserialize savepoint fromclassLoader
- the user code class loaderexternalPointer
- the external pointer of the given checkpointIOException
- Serialization failures are forwardedprotected void serializeOperatorState(OperatorState operatorState, DataOutputStream dos) throws IOException
serializeOperatorState
in class MetadataV2V3SerializerBase
IOException
protected void serializeSubtaskState(OperatorSubtaskState subtaskState, DataOutputStream dos) throws IOException
serializeSubtaskState
in class MetadataV2V3SerializerBase
IOException
protected OperatorState deserializeOperatorState(DataInputStream dis, @Nullable MetadataV2V3SerializerBase.DeserializationContext context) throws IOException
deserializeOperatorState
in class MetadataV2V3SerializerBase
IOException
@VisibleForTesting public void serializeResultSubpartitionStateHandle(ResultSubpartitionStateHandle handle, DataOutputStream dos) throws IOException
serializeResultSubpartitionStateHandle
in class MetadataV2V3SerializerBase
IOException
@VisibleForTesting public StateObjectCollection<ResultSubpartitionStateHandle> deserializeResultSubpartitionStateHandle(DataInputStream dis, @Nullable MetadataV2V3SerializerBase.DeserializationContext context) throws IOException
deserializeResultSubpartitionStateHandle
in class MetadataV2V3SerializerBase
IOException
@VisibleForTesting public void serializeInputChannelStateHandle(InputChannelStateHandle handle, DataOutputStream dos) throws IOException
serializeInputChannelStateHandle
in class MetadataV2V3SerializerBase
IOException
@VisibleForTesting public StateObjectCollection<InputChannelStateHandle> deserializeInputChannelStateHandle(DataInputStream dis, @Nullable MetadataV2V3SerializerBase.DeserializationContext context) throws IOException
deserializeInputChannelStateHandle
in class MetadataV2V3SerializerBase
IOException
@VisibleForTesting public static void serializeStreamStateHandle(StreamStateHandle stateHandle, DataOutputStream dos) throws IOException
IOException
@VisibleForTesting public static StreamStateHandle deserializeStreamStateHandle(DataInputStream dis) throws IOException
IOException
@VisibleForTesting public static void serializeOperatorStateHandleUtil(OperatorStateHandle stateHandle, DataOutputStream dos) throws IOException
IOException
@VisibleForTesting public static OperatorStateHandle deserializeOperatorStateHandleUtil(DataInputStream dis) throws IOException
IOException
@VisibleForTesting public static void serializeKeyedStateHandleUtil(KeyedStateHandle stateHandle, DataOutputStream dos) throws IOException
IOException
@VisibleForTesting public static KeyedStateHandle deserializeKeyedStateHandleUtil(DataInputStream dis) throws IOException
IOException
@VisibleForTesting public static StateObjectCollection<InputChannelStateHandle> deserializeInputChannelStateHandle(DataInputStream dis) throws IOException
IOException
@VisibleForTesting public StateObjectCollection<ResultSubpartitionStateHandle> deserializeResultSubpartitionStateHandle(DataInputStream dis) throws IOException
IOException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.