@Internal @VisibleForTesting public class SavepointV2Serializer extends Object implements SavepointSerializer<SavepointV2>
This format version adds
Basic checkpoint metadata layout:
+--------------+---------------+-----------------+ | checkpointID | master states | operator states | +--------------+---------------+-----------------+ Master state: +--------------+---------------------+---------+------+---------------+ | magic number | num remaining bytes | version | name | payload bytes | +--------------+---------------------+---------+------+---------------+
Modifier and Type | Field and Description |
---|---|
static SavepointV2Serializer |
INSTANCE
The singleton instance of the serializer
|
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 checkpointMetadata,
DataOutputStream dos)
Serializes a savepoint to an output stream.
|
static void |
serializeKeyedStateHandle(KeyedStateHandle stateHandle,
DataOutputStream dos) |
static void |
serializeOperatorStateHandle(OperatorStateHandle stateHandle,
DataOutputStream dos) |
static void |
serializeStreamStateHandle(StreamStateHandle stateHandle,
DataOutputStream dos) |
public static final SavepointV2Serializer INSTANCE
public void serialize(SavepointV2 checkpointMetadata, DataOutputStream dos) throws IOException
SavepointSerializer
serialize
in interface SavepointSerializer<SavepointV2>
checkpointMetadata
- 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 forwarded@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
public static StreamStateHandle deserializeStreamStateHandle(DataInputStream dis) throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.