public class TypeSerializerSnapshotSerializationUtil extends Object
TypeSerializerSnapshot
.Constructor and Description |
---|
TypeSerializerSnapshotSerializationUtil() |
Modifier and Type | Method and Description |
---|---|
static <T> TypeSerializerSnapshot<T> |
readAndInstantiateSnapshotClass(DataInputView in,
ClassLoader cl) |
static <T> TypeSerializerSnapshot<T> |
readSerializerSnapshot(DataInputView in,
ClassLoader userCodeClassLoader,
TypeSerializer<T> existingPriorSerializer)
Reads from a data input view a
TypeSerializerSnapshot that was previously
written using writeSerializerSnapshot(DataOutputView, TypeSerializerSnapshot, TypeSerializer) . |
static <T> void |
writeSerializerSnapshot(DataOutputView out,
TypeSerializerSnapshot<T> serializerSnapshot,
TypeSerializer<T> serializer)
Writes a
TypeSerializerSnapshot to the provided data output view. |
public TypeSerializerSnapshotSerializationUtil()
public static <T> void writeSerializerSnapshot(DataOutputView out, TypeSerializerSnapshot<T> serializerSnapshot, TypeSerializer<T> serializer) throws IOException
TypeSerializerSnapshot
to the provided data output view.
It is written with a format that can be later read again using
readSerializerSnapshot(DataInputView, ClassLoader, TypeSerializer)
.
out
- the data output viewserializerSnapshot
- the serializer configuration snapshot to writeserializer
- the prior serializer. This needs to be written of the serializer snapshot
if the serializer snapshot is still the legacy TypeSerializerConfigSnapshot
.IOException
public static <T> TypeSerializerSnapshot<T> readSerializerSnapshot(DataInputView in, ClassLoader userCodeClassLoader, @Nullable TypeSerializer<T> existingPriorSerializer) throws IOException
TypeSerializerSnapshot
that was previously
written using writeSerializerSnapshot(DataOutputView, TypeSerializerSnapshot, TypeSerializer)
.in
- the data input viewuserCodeClassLoader
- the user code class loader to useexistingPriorSerializer
- the prior serializer. This would only be non-null if we are
restoring from a snapshot taken with Flink version <= 1.6.IOException
public static <T> TypeSerializerSnapshot<T> readAndInstantiateSnapshotClass(DataInputView in, ClassLoader cl) throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.