@Internal public class SavepointV1Serializer extends Object implements SavepointSerializer<SavepointV2>
1
(Flink 1.2.x format)
In contrast to the previous versions, this serializer makes sure that no Java serialization is used for serialization. Therefore, we don't rely on any involved classes to stay the same.
Modifier and Type | Field and Description |
---|---|
static SavepointV1Serializer |
INSTANCE |
Modifier and Type | Method and Description |
---|---|
SavepointV2 |
deserialize(DataInputStream dis,
ClassLoader cl)
Deserializes a savepoint from an input stream.
|
static KeyedStateHandle |
deserializeKeyedStateHandle(DataInputStream dis) |
static OperatorStateHandle |
deserializeOperatorStateHandle(DataInputStream dis) |
static StreamStateHandle |
deserializeStreamStateHandle(DataInputStream dis) |
void |
serialize(SavepointV2 savepoint,
DataOutputStream dos)
Serializes a savepoint to an output stream.
|
static void |
serializeKeyedStateHandle(KeyedStateHandle stateHandle,
DataOutputStream dos) |
void |
serializeOld(SavepointV1 savepoint,
DataOutputStream dos) |
static void |
serializeOperatorStateHandle(OperatorStateHandle stateHandle,
DataOutputStream dos) |
static void |
serializeStreamStateHandle(StreamStateHandle stateHandle,
DataOutputStream dos) |
public static final SavepointV1Serializer INSTANCE
public void serialize(SavepointV2 savepoint, DataOutputStream dos) throws IOException
SavepointSerializer
serialize
in interface SavepointSerializer<SavepointV2>
savepoint
- Savepoint to serializedos
- Output stream to serialize the savepoint toIOException
- Serialization failures are forwardedpublic SavepointV2 deserialize(DataInputStream dis, ClassLoader cl) throws IOException
SavepointSerializer
deserialize
in interface SavepointSerializer<SavepointV2>
dis
- Input stream to deserialize savepoint fromcl
- the user code class loaderIOException
- Serialization failures are forwardedpublic void serializeOld(SavepointV1 savepoint, DataOutputStream dos) throws IOException
IOException
@VisibleForTesting public static void serializeKeyedStateHandle(KeyedStateHandle stateHandle, DataOutputStream dos) throws IOException
IOException
@VisibleForTesting public static KeyedStateHandle deserializeKeyedStateHandle(DataInputStream dis) throws IOException
IOException
@VisibleForTesting public static void serializeOperatorStateHandle(OperatorStateHandle stateHandle, DataOutputStream dos) throws IOException
IOException
@VisibleForTesting public static OperatorStateHandle deserializeOperatorStateHandle(DataInputStream dis) throws IOException
IOException
@VisibleForTesting public static void serializeStreamStateHandle(StreamStateHandle stateHandle, DataOutputStream dos) throws IOException
IOException
@VisibleForTesting public static StreamStateHandle deserializeStreamStateHandle(DataInputStream dis) throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.