Class MetadataV1Serializer
- java.lang.Object
-
- org.apache.flink.runtime.checkpoint.metadata.MetadataV1Serializer
-
- All Implemented Interfaces:
org.apache.flink.core.io.Versioned,MetadataSerializer
@Internal public class MetadataV1Serializer extends Object implements MetadataSerializer
Deserializer for checkpoints written in format1(Flink 1.2.x format). This class is only retained to give a better error message: Rather than getting a "unknown version", the user gets a "version no longer supported".
-
-
Field Summary
Fields Modifier and Type Field Description static MetadataV1SerializerINSTANCEstatic intVERSIONThe savepoint version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointMetadatadeserialize(DataInputStream dis, ClassLoader cl, String externalPointer)Deserializes a savepoint from an input stream.intgetVersion()voidserialize(CheckpointMetadata checkpointMetadata, DataOutputStream dos)Serializes a savepoint or checkpoint metadata to an output stream.
-
-
-
Field Detail
-
VERSION
public static final int VERSION
The savepoint version.- See Also:
- Constant Field Values
-
INSTANCE
public static final MetadataV1Serializer INSTANCE
-
-
Method Detail
-
getVersion
public int getVersion()
- Specified by:
getVersionin interfaceorg.apache.flink.core.io.Versioned
-
deserialize
public CheckpointMetadata deserialize(DataInputStream dis, ClassLoader cl, String externalPointer) throws IOException
Description copied from interface:MetadataSerializerDeserializes a savepoint from an input stream.- Specified by:
deserializein interfaceMetadataSerializer- Parameters:
dis- Input stream to deserialize savepoint fromcl- the user code class loaderexternalPointer- the external pointer of the given checkpoint- Returns:
- The deserialized savepoint
- Throws:
IOException- Serialization failures are forwarded
-
serialize
public void serialize(CheckpointMetadata checkpointMetadata, DataOutputStream dos) throws IOException
Description copied from interface:MetadataSerializerSerializes a savepoint or checkpoint metadata to an output stream.- Specified by:
serializein interfaceMetadataSerializer- Throws:
IOException- Serialization failures are forwarded
-
-