Package org.apache.flink.runtime.state
Class KeyedBackendSerializationProxy<K>
- java.lang.Object
-
- org.apache.flink.core.io.VersionedIOReadableWritable
-
- org.apache.flink.runtime.state.KeyedBackendSerializationProxy<K>
-
- All Implemented Interfaces:
IOReadableWritable
,Versioned
public class KeyedBackendSerializationProxy<K> extends VersionedIOReadableWritable
Serialization proxy for all meta data in keyed 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 KeyedBackendSerializationProxy(ClassLoader userCodeClassLoader)
KeyedBackendSerializationProxy(TypeSerializer<K> keySerializer, List<StateMetaInfoSnapshot> stateMetaInfoSnapshots, boolean compression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<String>
getAdditionalDetailsForIncompatibleVersion(int readVersion)
int[]
getCompatibleVersions()
Returns the compatible version values.TypeSerializerSnapshot<K>
getKeySerializerSnapshot()
List<StateMetaInfoSnapshot>
getStateMetaInfoSnapshots()
int
getVersion()
Returns the version number of the object.boolean
isUsingKeyGroupCompression()
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
getReadVersion
-
-
-
-
Field Detail
-
VERSION
public static final int VERSION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KeyedBackendSerializationProxy
public KeyedBackendSerializationProxy(ClassLoader userCodeClassLoader)
-
KeyedBackendSerializationProxy
public KeyedBackendSerializationProxy(TypeSerializer<K> keySerializer, List<StateMetaInfoSnapshot> stateMetaInfoSnapshots, boolean compression)
-
-
Method Detail
-
getStateMetaInfoSnapshots
public List<StateMetaInfoSnapshot> getStateMetaInfoSnapshots()
-
getKeySerializerSnapshot
public TypeSerializerSnapshot<K> getKeySerializerSnapshot()
-
isUsingKeyGroupCompression
public boolean isUsingKeyGroupCompression()
-
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.
-
getAdditionalDetailsForIncompatibleVersion
public Optional<String> getAdditionalDetailsForIncompatibleVersion(int readVersion)
- Overrides:
getAdditionalDetailsForIncompatibleVersion
in classVersionedIOReadableWritable
-
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
-
-