SavepointWriter
and the data stream api
under batch execution. For reading a savepoint, use SavepointReader
and the data
stream api under batch execution.@PublicEvolving @Deprecated public class ExistingSavepoint extends WritableSavepoint<ExistingSavepoint>
New savepoints written using this class are based on the previous existing savepoint. This means that for existing operators that remain untouched, the new savepoint only contains a shallow copy of pointers to state data that resides in the previous existing savepoint paths. This means that both savepoints share state and one cannot be deleted without corrupting the other!
SavepointReader
,
SavepointWriter
Modifier and Type | Method and Description |
---|---|
<K,V> DataSource<Tuple2<K,V>> |
readBroadcastState(String uid,
String name,
TypeInformation<K> keyTypeInfo,
TypeInformation<V> valueTypeInfo)
Deprecated.
Read operator
BroadcastState from a Savepoint . |
<K,V> DataSource<Tuple2<K,V>> |
readBroadcastState(String uid,
String name,
TypeInformation<K> keyTypeInfo,
TypeInformation<V> valueTypeInfo,
TypeSerializer<K> keySerializer,
TypeSerializer<V> valueSerializer)
Deprecated.
Read operator
BroadcastState from a Savepoint when a custom serializer was
used; e.g., a different serializer than the one returned by TypeInformation#createSerializer . |
<K,OUT> DataSource<OUT> |
readKeyedState(String uid,
KeyedStateReaderFunction<K,OUT> function)
Deprecated.
Read keyed state from an operator in a
Savepoint . |
<K,OUT> DataSource<OUT> |
readKeyedState(String uid,
KeyedStateReaderFunction<K,OUT> function,
TypeInformation<K> keyTypeInfo,
TypeInformation<OUT> outTypeInfo)
Deprecated.
Read keyed state from an operator in a
Savepoint . |
<T> DataSource<T> |
readListState(String uid,
String name,
TypeInformation<T> typeInfo)
Deprecated.
Read operator
ListState from a Savepoint . |
<T> DataSource<T> |
readListState(String uid,
String name,
TypeInformation<T> typeInfo,
TypeSerializer<T> serializer)
Deprecated.
Read operator
ListState from a Savepoint when a custom serializer was used;
e.g., a different serializer than the one returned by TypeInformation#createSerializer . |
<T> DataSource<T> |
readUnionState(String uid,
String name,
TypeInformation<T> typeInfo)
Deprecated.
Read operator
UnionState from a Savepoint . |
<T> DataSource<T> |
readUnionState(String uid,
String name,
TypeInformation<T> typeInfo,
TypeSerializer<T> serializer)
Deprecated.
Read operator
UnionState from a Savepoint when a custom serializer was used;
e.g., a different serializer than the one returned by TypeInformation#createSerializer . |
<W extends Window> |
window(TypeSerializer<W> windowSerializer)
Deprecated.
Read window state from an operator in a
Savepoint . |
<W extends Window> |
window(WindowAssigner<?,W> assigner)
Deprecated.
Read window state from an operator in a
Savepoint . |
removeOperator, withConfiguration, withOperator, write
public <T> DataSource<T> readListState(String uid, String name, TypeInformation<T> typeInfo) throws IOException
ListState
from a Savepoint
.T
- The type of the values that are in the list state.uid
- The uid of the operator.name
- The (unique) name for the state.typeInfo
- The type of the elements in the state.DataSet
representing the elements in state.IOException
- If the savepoint path is invalid or the uid does not exist.public <T> DataSource<T> readListState(String uid, String name, TypeInformation<T> typeInfo, TypeSerializer<T> serializer) throws IOException
ListState
from a Savepoint
when a custom serializer was used;
e.g., a different serializer than the one returned by TypeInformation#createSerializer
.T
- The type of the values that are in the list state.uid
- The uid of the operator.name
- The (unique) name for the state.typeInfo
- The type of the elements in the state.serializer
- The serializer used to write the elements into state.DataSet
representing the elements in state.IOException
- If the savepoint path is invalid or the uid does not exist.public <T> DataSource<T> readUnionState(String uid, String name, TypeInformation<T> typeInfo) throws IOException
UnionState
from a Savepoint
.T
- The type of the values that are in the union state.uid
- The uid of the operator.name
- The (unique) name for the state.typeInfo
- The type of the elements in the state.DataSet
representing the elements in state.IOException
- If the savepoint path is invalid or the uid does not exist.public <T> DataSource<T> readUnionState(String uid, String name, TypeInformation<T> typeInfo, TypeSerializer<T> serializer) throws IOException
UnionState
from a Savepoint
when a custom serializer was used;
e.g., a different serializer than the one returned by TypeInformation#createSerializer
.T
- The type of the values that are in the union state.uid
- The uid of the operator.name
- The (unique) name for the state.typeInfo
- The type of the elements in the state.serializer
- The serializer used to write the elements into state.DataSet
representing the elements in state.IOException
- If the savepoint path is invalid or the uid does not exist.public <K,V> DataSource<Tuple2<K,V>> readBroadcastState(String uid, String name, TypeInformation<K> keyTypeInfo, TypeInformation<V> valueTypeInfo) throws IOException
BroadcastState
from a Savepoint
.K
- The type of keys in state.V
- The type of values in state.uid
- The uid of the operator.name
- The (unique) name for the state.keyTypeInfo
- The type information for the keys in the state.valueTypeInfo
- The type information for the values in the state.DataSet
of key-value pairs from state.IOException
- If the savepoint does not contain the specified uid.public <K,V> DataSource<Tuple2<K,V>> readBroadcastState(String uid, String name, TypeInformation<K> keyTypeInfo, TypeInformation<V> valueTypeInfo, TypeSerializer<K> keySerializer, TypeSerializer<V> valueSerializer) throws IOException
BroadcastState
from a Savepoint
when a custom serializer was
used; e.g., a different serializer than the one returned by TypeInformation#createSerializer
.K
- The type of keys in state.V
- The type of values in state.uid
- The uid of the operator.name
- The (unique) name for the state.keyTypeInfo
- The type information for the keys in the state.valueTypeInfo
- The type information for the values in the state.keySerializer
- The type serializer used to write keys into the state.valueSerializer
- The type serializer used to write values into the state.DataSet
of key-value pairs from state.IOException
- If the savepoint path is invalid or the uid does not exist.public <K,OUT> DataSource<OUT> readKeyedState(String uid, KeyedStateReaderFunction<K,OUT> function) throws IOException
Savepoint
.K
- The type of the key in state.OUT
- The output type of the transform function.uid
- The uid of the operator.function
- The KeyedStateReaderFunction
that is called for each key in state.DataSet
of objects read from keyed state.IOException
- If the savepoint does not contain operator state with the given uid.public <K,OUT> DataSource<OUT> readKeyedState(String uid, KeyedStateReaderFunction<K,OUT> function, TypeInformation<K> keyTypeInfo, TypeInformation<OUT> outTypeInfo) throws IOException
Savepoint
.K
- The type of the key in state.OUT
- The output type of the transform function.uid
- The uid of the operator.function
- The KeyedStateReaderFunction
that is called for each key in state.keyTypeInfo
- The type information of the key in state.outTypeInfo
- The type information of the output of the transform reader function.DataSet
of objects read from keyed state.IOException
- If the savepoint does not contain operator state with the given uid.public <W extends Window> WindowReader<W> window(WindowAssigner<?,W> assigner)
Savepoint
. This method supports reading from
any type of window.assigner
- The WindowAssigner
used to write out the operator.WindowReader
.public <W extends Window> WindowReader<W> window(TypeSerializer<W> windowSerializer)
Savepoint
. This method supports reading from
any type of window.windowSerializer
- The serializer used for the window type.WindowReader
.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.