Class MetadataV1Serializer
java.lang.Object
org.apache.flink.runtime.checkpoint.metadata.MetadataV1Serializer
- All Implemented Interfaces:
org.apache.flink.core.io.Versioned,MetadataSerializer
Deserializer for checkpoints written in format
1 (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
FieldsModifier and TypeFieldDescriptionstatic final MetadataV1Serializerstatic final intThe savepoint version. -
Method Summary
Modifier and TypeMethodDescriptiondeserialize(DataInputStream dis, ClassLoader cl, String externalPointer) Deserializes a savepoint from an input stream.intvoidserialize(CheckpointMetadata checkpointMetadata, DataOutputStream dos) Serializes a savepoint or checkpoint metadata to an output stream.
-
Field Details
-
VERSION
public static final int VERSIONThe savepoint version.- See Also:
-
INSTANCE
-
-
Method Details
-
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
-