@Internal public final class SavepointRuntimeContext extends Object implements org.apache.flink.api.common.functions.RuntimeContext
RuntimeContext which delegates to the underlying batch RuntimeContext
along with a specified KeyedStateStore.
This RuntimeContext has the ability to force eager state registration by throwing an
exception if state is registered outside of open.
| Constructor and Description |
|---|
SavepointRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext ctx,
org.apache.flink.api.common.state.KeyedStateStore keyedStateStore) |
| Modifier and Type | Method and Description |
|---|---|
<V,A extends Serializable> |
addAccumulator(String name,
org.apache.flink.api.common.accumulators.Accumulator<V,A> accumulator) |
void |
disableStateRegistration() |
<V,A extends Serializable> |
getAccumulator(String name) |
<IN,ACC,OUT> |
getAggregatingState(org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT> stateProperties) |
int |
getAttemptNumber() |
<RT> List<RT> |
getBroadcastVariable(String name) |
<T,C> C |
getBroadcastVariableWithInitializer(String name,
org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer) |
org.apache.flink.api.common.cache.DistributedCache |
getDistributedCache() |
org.apache.flink.api.common.accumulators.DoubleCounter |
getDoubleCounter(String name) |
org.apache.flink.api.common.ExecutionConfig |
getExecutionConfig() |
Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo> |
getExternalResourceInfos(String resourceName) |
org.apache.flink.api.common.accumulators.Histogram |
getHistogram(String name) |
int |
getIndexOfThisSubtask() |
org.apache.flink.api.common.accumulators.IntCounter |
getIntCounter(String name) |
org.apache.flink.api.common.JobID |
getJobId() |
<T> org.apache.flink.api.common.state.ListState<T> |
getListState(org.apache.flink.api.common.state.ListStateDescriptor<T> stateProperties) |
org.apache.flink.api.common.accumulators.LongCounter |
getLongCounter(String name) |
<UK,UV> org.apache.flink.api.common.state.MapState<UK,UV> |
getMapState(org.apache.flink.api.common.state.MapStateDescriptor<UK,UV> stateProperties) |
int |
getMaxNumberOfParallelSubtasks() |
org.apache.flink.metrics.groups.OperatorMetricGroup |
getMetricGroup() |
int |
getNumberOfParallelSubtasks() |
<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.ValueState<T> |
getState(org.apache.flink.api.common.state.ValueStateDescriptor<T> stateProperties) |
List<org.apache.flink.api.common.state.StateDescriptor<?,?>> |
getStateDescriptors() |
String |
getTaskName() |
String |
getTaskNameWithSubtasks() |
ClassLoader |
getUserCodeClassLoader() |
boolean |
hasBroadcastVariable(String name) |
void |
registerUserCodeClassLoaderReleaseHookIfAbsent(String releaseHookName,
Runnable releaseHook) |
public SavepointRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext ctx,
org.apache.flink.api.common.state.KeyedStateStore keyedStateStore)
public org.apache.flink.api.common.JobID getJobId()
getJobId in interface org.apache.flink.api.common.functions.RuntimeContextpublic String getTaskName()
getTaskName in interface org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.metrics.groups.OperatorMetricGroup getMetricGroup()
getMetricGroup in interface org.apache.flink.api.common.functions.RuntimeContextpublic int getNumberOfParallelSubtasks()
getNumberOfParallelSubtasks in interface org.apache.flink.api.common.functions.RuntimeContextpublic int getMaxNumberOfParallelSubtasks()
getMaxNumberOfParallelSubtasks in interface org.apache.flink.api.common.functions.RuntimeContextpublic int getIndexOfThisSubtask()
getIndexOfThisSubtask in interface org.apache.flink.api.common.functions.RuntimeContextpublic int getAttemptNumber()
getAttemptNumber in interface org.apache.flink.api.common.functions.RuntimeContextpublic String getTaskNameWithSubtasks()
getTaskNameWithSubtasks in interface org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.ExecutionConfig getExecutionConfig()
getExecutionConfig in interface org.apache.flink.api.common.functions.RuntimeContextpublic ClassLoader getUserCodeClassLoader()
getUserCodeClassLoader in interface org.apache.flink.api.common.functions.RuntimeContextpublic void registerUserCodeClassLoaderReleaseHookIfAbsent(String releaseHookName, Runnable releaseHook)
registerUserCodeClassLoaderReleaseHookIfAbsent in interface org.apache.flink.api.common.functions.RuntimeContextpublic <V,A extends Serializable> void addAccumulator(String name, org.apache.flink.api.common.accumulators.Accumulator<V,A> accumulator)
addAccumulator in interface org.apache.flink.api.common.functions.RuntimeContextpublic <V,A extends Serializable> org.apache.flink.api.common.accumulators.Accumulator<V,A> getAccumulator(String name)
getAccumulator in interface org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.IntCounter getIntCounter(String name)
getIntCounter in interface org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.LongCounter getLongCounter(String name)
getLongCounter in interface org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.DoubleCounter getDoubleCounter(String name)
getDoubleCounter in interface org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.Histogram getHistogram(String name)
getHistogram in interface org.apache.flink.api.common.functions.RuntimeContextpublic Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo> getExternalResourceInfos(String resourceName)
getExternalResourceInfos in interface org.apache.flink.api.common.functions.RuntimeContextpublic boolean hasBroadcastVariable(String name)
hasBroadcastVariable in interface org.apache.flink.api.common.functions.RuntimeContextpublic <RT> List<RT> getBroadcastVariable(String name)
getBroadcastVariable in interface org.apache.flink.api.common.functions.RuntimeContextpublic <T,C> C getBroadcastVariableWithInitializer(String name, org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer)
getBroadcastVariableWithInitializer in interface org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.cache.DistributedCache getDistributedCache()
getDistributedCache in interface org.apache.flink.api.common.functions.RuntimeContextpublic <T> org.apache.flink.api.common.state.ValueState<T> getState(org.apache.flink.api.common.state.ValueStateDescriptor<T> stateProperties)
getState in interface org.apache.flink.api.common.functions.RuntimeContextpublic <T> org.apache.flink.api.common.state.ListState<T> getListState(org.apache.flink.api.common.state.ListStateDescriptor<T> stateProperties)
getListState in interface org.apache.flink.api.common.functions.RuntimeContextpublic <T> org.apache.flink.api.common.state.ReducingState<T> getReducingState(org.apache.flink.api.common.state.ReducingStateDescriptor<T> stateProperties)
getReducingState in interface org.apache.flink.api.common.functions.RuntimeContextpublic <IN,ACC,OUT> org.apache.flink.api.common.state.AggregatingState<IN,OUT> getAggregatingState(org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT> stateProperties)
getAggregatingState in interface org.apache.flink.api.common.functions.RuntimeContextpublic <UK,UV> org.apache.flink.api.common.state.MapState<UK,UV> getMapState(org.apache.flink.api.common.state.MapStateDescriptor<UK,UV> stateProperties)
getMapState in interface org.apache.flink.api.common.functions.RuntimeContextpublic List<org.apache.flink.api.common.state.StateDescriptor<?,?>> getStateDescriptors()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.