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 MetadataV1Serializer
INSTANCE
static int
VERSION
The savepoint version.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CheckpointMetadata
deserialize(DataInputStream dis, ClassLoader cl, String externalPointer)
Deserializes a savepoint from an input stream.int
getVersion()
void
serialize(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:
getVersion
in interfaceorg.apache.flink.core.io.Versioned
-
deserialize
public CheckpointMetadata deserialize(DataInputStream dis, ClassLoader cl, String externalPointer) throws IOException
Description copied from interface:MetadataSerializer
Deserializes a savepoint from an input stream.- Specified by:
deserialize
in 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:MetadataSerializer
Serializes a savepoint or checkpoint metadata to an output stream.- Specified by:
serialize
in interfaceMetadataSerializer
- Throws:
IOException
- Serialization failures are forwarded
-
-