Class SavepointRuntimeContext
- java.lang.Object
-
- org.apache.flink.state.api.runtime.SavepointRuntimeContext
-
- All Implemented Interfaces:
org.apache.flink.api.common.functions.RuntimeContext
@Internal public final class SavepointRuntimeContext extends Object implements org.apache.flink.api.common.functions.RuntimeContext
A streamingRuntimeContextwhich delegates to the underlying batchRuntimeContextalong with a specifiedKeyedStateStore.This
RuntimeContexthas the ability to force eager state registration by throwing an exception if state is registered outside of open.
-
-
Constructor Summary
Constructors Constructor Description SavepointRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext ctx, org.apache.flink.api.common.state.KeyedStateStore keyedStateStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <V,A extends Serializable>
voidaddAccumulator(String name, org.apache.flink.api.common.accumulators.Accumulator<V,A> accumulator)<T> org.apache.flink.api.common.typeutils.TypeSerializer<T>createSerializer(org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInformation)voiddisableStateRegistration()<V,A extends Serializable>
org.apache.flink.api.common.accumulators.Accumulator<V,A>getAccumulator(String name)<IN,ACC,OUT>
org.apache.flink.api.common.state.AggregatingState<IN,OUT>getAggregatingState(org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT> stateProperties)<IN,ACC,OUT>
org.apache.flink.api.common.state.v2.AggregatingState<IN,OUT>getAggregatingState(org.apache.flink.api.common.state.v2.AggregatingStateDescriptor<IN,ACC,OUT> stateProperties)<RT> List<RT>getBroadcastVariable(String name)<T,C>
CgetBroadcastVariableWithInitializer(String name, org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer)org.apache.flink.api.common.cache.DistributedCachegetDistributedCache()org.apache.flink.api.common.accumulators.DoubleCountergetDoubleCounter(String name)Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo>getExternalResourceInfos(String resourceName)Map<String,String>getGlobalJobParameters()org.apache.flink.api.common.accumulators.HistogramgetHistogram(String name)org.apache.flink.api.common.accumulators.IntCountergetIntCounter(String name)org.apache.flink.api.common.JobInfogetJobInfo()<T> org.apache.flink.api.common.state.ListState<T>getListState(org.apache.flink.api.common.state.ListStateDescriptor<T> stateProperties)<T> org.apache.flink.api.common.state.v2.ListState<T>getListState(org.apache.flink.api.common.state.v2.ListStateDescriptor<T> stateProperties)org.apache.flink.api.common.accumulators.LongCountergetLongCounter(String name)<UK,UV>
org.apache.flink.api.common.state.MapState<UK,UV>getMapState(org.apache.flink.api.common.state.MapStateDescriptor<UK,UV> stateProperties)<UK,UV>
org.apache.flink.api.common.state.v2.MapState<UK,UV>getMapState(org.apache.flink.api.common.state.v2.MapStateDescriptor<UK,UV> stateProperties)org.apache.flink.metrics.groups.OperatorMetricGroupgetMetricGroup()<T> org.apache.flink.api.common.state.ReducingState<T>getReducingState(org.apache.flink.api.common.state.ReducingStateDescriptor<T> stateProperties)<T> org.apache.flink.api.common.state.v2.ReducingState<T>getReducingState(org.apache.flink.api.common.state.v2.ReducingStateDescriptor<T> stateProperties)<T> org.apache.flink.api.common.state.v2.ValueState<T>getState(org.apache.flink.api.common.state.v2.ValueStateDescriptor<T> stateProperties)<T> org.apache.flink.api.common.state.ValueState<T>getState(org.apache.flink.api.common.state.ValueStateDescriptor<T> stateProperties)List<org.apache.flink.api.common.state.StateDescriptor<?,?>>getStateDescriptors()org.apache.flink.api.common.TaskInfogetTaskInfo()ClassLoadergetUserCodeClassLoader()booleanhasBroadcastVariable(String name)booleanisObjectReuseEnabled()voidregisterUserCodeClassLoaderReleaseHookIfAbsent(String releaseHookName, Runnable releaseHook)
-
-
-
Method Detail
-
getJobInfo
public org.apache.flink.api.common.JobInfo getJobInfo()
- Specified by:
getJobInfoin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getTaskInfo
public org.apache.flink.api.common.TaskInfo getTaskInfo()
- Specified by:
getTaskInfoin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getMetricGroup
public org.apache.flink.metrics.groups.OperatorMetricGroup getMetricGroup()
- Specified by:
getMetricGroupin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
createSerializer
public <T> org.apache.flink.api.common.typeutils.TypeSerializer<T> createSerializer(org.apache.flink.api.common.typeinfo.TypeInformation<T> typeInformation)
- Specified by:
createSerializerin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getGlobalJobParameters
public Map<String,String> getGlobalJobParameters()
- Specified by:
getGlobalJobParametersin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
isObjectReuseEnabled
public boolean isObjectReuseEnabled()
- Specified by:
isObjectReuseEnabledin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getUserCodeClassLoader
public ClassLoader getUserCodeClassLoader()
- Specified by:
getUserCodeClassLoaderin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
registerUserCodeClassLoaderReleaseHookIfAbsent
public void registerUserCodeClassLoaderReleaseHookIfAbsent(String releaseHookName, Runnable releaseHook)
- Specified by:
registerUserCodeClassLoaderReleaseHookIfAbsentin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
addAccumulator
public <V,A extends Serializable> void addAccumulator(String name, org.apache.flink.api.common.accumulators.Accumulator<V,A> accumulator)
- Specified by:
addAccumulatorin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getAccumulator
public <V,A extends Serializable> org.apache.flink.api.common.accumulators.Accumulator<V,A> getAccumulator(String name)
- Specified by:
getAccumulatorin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getIntCounter
public org.apache.flink.api.common.accumulators.IntCounter getIntCounter(String name)
- Specified by:
getIntCounterin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getLongCounter
public org.apache.flink.api.common.accumulators.LongCounter getLongCounter(String name)
- Specified by:
getLongCounterin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getDoubleCounter
public org.apache.flink.api.common.accumulators.DoubleCounter getDoubleCounter(String name)
- Specified by:
getDoubleCounterin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getHistogram
public org.apache.flink.api.common.accumulators.Histogram getHistogram(String name)
- Specified by:
getHistogramin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getExternalResourceInfos
public Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo> getExternalResourceInfos(String resourceName)
- Specified by:
getExternalResourceInfosin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
hasBroadcastVariable
public boolean hasBroadcastVariable(String name)
- Specified by:
hasBroadcastVariablein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getBroadcastVariable
public <RT> List<RT> getBroadcastVariable(String name)
- Specified by:
getBroadcastVariablein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getBroadcastVariableWithInitializer
public <T,C> C getBroadcastVariableWithInitializer(String name, org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer)
- Specified by:
getBroadcastVariableWithInitializerin interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getDistributedCache
public org.apache.flink.api.common.cache.DistributedCache getDistributedCache()
- Specified by:
getDistributedCachein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getState
public <T> org.apache.flink.api.common.state.ValueState<T> getState(org.apache.flink.api.common.state.ValueStateDescriptor<T> stateProperties)
- Specified by:
getStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getListState
public <T> org.apache.flink.api.common.state.ListState<T> getListState(org.apache.flink.api.common.state.ListStateDescriptor<T> stateProperties)
- Specified by:
getListStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getReducingState
public <T> org.apache.flink.api.common.state.ReducingState<T> getReducingState(org.apache.flink.api.common.state.ReducingStateDescriptor<T> stateProperties)
- Specified by:
getReducingStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getAggregatingState
public <IN,ACC,OUT> org.apache.flink.api.common.state.AggregatingState<IN,OUT> getAggregatingState(org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT> stateProperties)
- Specified by:
getAggregatingStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getMapState
public <UK,UV> org.apache.flink.api.common.state.MapState<UK,UV> getMapState(org.apache.flink.api.common.state.MapStateDescriptor<UK,UV> stateProperties)
- Specified by:
getMapStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getState
public <T> org.apache.flink.api.common.state.v2.ValueState<T> getState(org.apache.flink.api.common.state.v2.ValueStateDescriptor<T> stateProperties)
- Specified by:
getStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getListState
public <T> org.apache.flink.api.common.state.v2.ListState<T> getListState(org.apache.flink.api.common.state.v2.ListStateDescriptor<T> stateProperties)
- Specified by:
getListStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getReducingState
public <T> org.apache.flink.api.common.state.v2.ReducingState<T> getReducingState(org.apache.flink.api.common.state.v2.ReducingStateDescriptor<T> stateProperties)
- Specified by:
getReducingStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getAggregatingState
public <IN,ACC,OUT> org.apache.flink.api.common.state.v2.AggregatingState<IN,OUT> getAggregatingState(org.apache.flink.api.common.state.v2.AggregatingStateDescriptor<IN,ACC,OUT> stateProperties)
- Specified by:
getAggregatingStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getMapState
public <UK,UV> org.apache.flink.api.common.state.v2.MapState<UK,UV> getMapState(org.apache.flink.api.common.state.v2.MapStateDescriptor<UK,UV> stateProperties)
- Specified by:
getMapStatein interfaceorg.apache.flink.api.common.functions.RuntimeContext
-
getStateDescriptors
public List<org.apache.flink.api.common.state.StateDescriptor<?,?>> getStateDescriptors()
-
-