public static class ValueWithTs.Serializer extends CompositeSerializer<ValueWithTs<?>>
CompositeSerializer.ConfigSnapshot, CompositeSerializer.PrecomputedParameters
fieldSerializers
Constructor and Description |
---|
Serializer(TypeSerializer<?> valueSerializer,
TypeSerializer<Long> timestampSerializer) |
Modifier and Type | Method and Description |
---|---|
ValueWithTs<?> |
createInstance(Object... values)
Create new instance from its fields.
|
protected CompositeSerializer<ValueWithTs<?>> |
createSerializerInstance(CompositeSerializer.PrecomputedParameters precomputed,
TypeSerializer<?>... originalSerializers)
Factory for concrete serializer.
|
protected Object |
getField(ValueWithTs<?> value,
int index)
Get field of existing instance.
|
protected void |
setField(ValueWithTs<?> value,
int index,
Object fieldValue)
Modify field of existing instance.
|
TypeSerializerSnapshot<ValueWithTs<?>> |
snapshotConfiguration()
Snapshots the configuration of this TypeSerializer.
|
copy, copy, copy, createInstance, deserialize, deserialize, duplicate, equals, getLength, hashCode, isImmutableType, serialize
public Serializer(TypeSerializer<?> valueSerializer, TypeSerializer<Long> timestampSerializer)
public ValueWithTs<?> createInstance(@Nonnull Object... values)
CompositeSerializer
createInstance
in class CompositeSerializer<ValueWithTs<?>>
protected void setField(@Nonnull ValueWithTs<?> value, int index, Object fieldValue)
CompositeSerializer
setField
in class CompositeSerializer<ValueWithTs<?>>
protected Object getField(@Nonnull ValueWithTs<?> value, int index)
CompositeSerializer
getField
in class CompositeSerializer<ValueWithTs<?>>
protected CompositeSerializer<ValueWithTs<?>> createSerializerInstance(CompositeSerializer.PrecomputedParameters precomputed, TypeSerializer<?>... originalSerializers)
CompositeSerializer
createSerializerInstance
in class CompositeSerializer<ValueWithTs<?>>
public TypeSerializerSnapshot<ValueWithTs<?>> snapshotConfiguration()
TypeSerializer
The snapshot of the TypeSerializer is supposed to contain all information that affects the serialization format of the serializer. The snapshot serves two purposes: First, to reproduce the serializer when the checkpoint/savepoint is restored, and second, to check whether the serialization format is compatible with the serializer used in the restored program.
IMPORTANT: TypeSerializerSnapshots changed after Flink 1.6. Serializers implemented against Flink versions up to 1.6 should still work, but adjust to new model to enable state evolution and be future-proof. See the class-level comments, section "Upgrading TypeSerializers to the new TypeSerializerSnapshot model" for details.
snapshotConfiguration
in class TypeSerializer<ValueWithTs<?>>
null
).TypeSerializerSnapshot.resolveSchemaCompatibility(TypeSerializer)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.