Package org.apache.flink.runtime.state
Class OperatorBackendSerializationProxy
- java.lang.Object
-
- org.apache.flink.core.io.VersionedIOReadableWritable
-
- org.apache.flink.runtime.state.OperatorBackendSerializationProxy
-
- All Implemented Interfaces:
IOReadableWritable
,Versioned
public class OperatorBackendSerializationProxy extends VersionedIOReadableWritable
Serialization proxy for all meta data in operator state backends. In the future we might also requiresMigration the actual state serialization logic here.
-
-
Field Summary
Fields Modifier and Type Field Description static int
VERSION
-
Constructor Summary
Constructors Constructor Description OperatorBackendSerializationProxy(ClassLoader userCodeClassLoader)
OperatorBackendSerializationProxy(List<StateMetaInfoSnapshot> operatorStateMetaInfoSnapshots, List<StateMetaInfoSnapshot> broadcastStateMetaInfoSnapshots, boolean compression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<StateMetaInfoSnapshot>
getBroadcastStateMetaInfoSnapshots()
int[]
getCompatibleVersions()
Returns the compatible version values.List<StateMetaInfoSnapshot>
getOperatorStateMetaInfoSnapshots()
int
getVersion()
Returns the version number of the object.void
read(DataInputView in)
Reads the object's internal data from the given data input view.void
write(DataOutputView out)
Writes the object's internal data to the given data output view.-
Methods inherited from class org.apache.flink.core.io.VersionedIOReadableWritable
getAdditionalDetailsForIncompatibleVersion, getReadVersion
-
-
-
-
Field Detail
-
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
OperatorBackendSerializationProxy
public OperatorBackendSerializationProxy(ClassLoader userCodeClassLoader)
-
OperatorBackendSerializationProxy
public OperatorBackendSerializationProxy(List<StateMetaInfoSnapshot> operatorStateMetaInfoSnapshots, List<StateMetaInfoSnapshot> broadcastStateMetaInfoSnapshots, boolean compression)
-
-
Method Detail
-
getVersion
public int getVersion()
Description copied from interface:Versioned
Returns the version number of the object. Versions numbers can be used to differentiate evolving classes.
-
getCompatibleVersions
public int[] getCompatibleVersions()
Description copied from class:VersionedIOReadableWritable
Returns the compatible version values.By default, the base implementation recognizes only the current version (identified by
Versioned.getVersion()
) as compatible. This method can be used as a hook and may be overridden to identify more compatible versions.- Overrides:
getCompatibleVersions
in classVersionedIOReadableWritable
- Returns:
- an array of integers representing the compatible version values.
-
write
public void write(DataOutputView out) throws IOException
Description copied from interface:IOReadableWritable
Writes the object's internal data to the given data output view.- Specified by:
write
in interfaceIOReadableWritable
- Overrides:
write
in classVersionedIOReadableWritable
- Parameters:
out
- the output view to receive the data.- Throws:
IOException
- thrown if any error occurs while writing to the output stream
-
read
public void read(DataInputView in) throws IOException
Description copied from interface:IOReadableWritable
Reads the object's internal data from the given data input view.- Specified by:
read
in interfaceIOReadableWritable
- Overrides:
read
in classVersionedIOReadableWritable
- Parameters:
in
- the input view to read the data from- Throws:
IOException
- thrown if any error occurs while reading from the input stream
-
getOperatorStateMetaInfoSnapshots
public List<StateMetaInfoSnapshot> getOperatorStateMetaInfoSnapshots()
-
getBroadcastStateMetaInfoSnapshots
public List<StateMetaInfoSnapshot> getBroadcastStateMetaInfoSnapshots()
-
-