@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.
| 构造器和说明 |
|---|
SavepointRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext ctx,
org.apache.flink.api.common.state.KeyedStateStore keyedStateStore) |
| 限定符和类型 | 方法和说明 |
|---|---|
<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) |
Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> |
getAllAccumulators()
已过时。
|
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() |
<T,ACC> org.apache.flink.api.common.state.FoldingState<T,ACC> |
getFoldingState(org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateProperties)
已过时。
|
org.apache.flink.api.common.accumulators.Histogram |
getHistogram(String name) |
int |
getIndexOfThisSubtask() |
org.apache.flink.api.common.accumulators.IntCounter |
getIntCounter(String name) |
<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.MetricGroup |
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) |
public SavepointRuntimeContext(org.apache.flink.api.common.functions.RuntimeContext ctx,
org.apache.flink.api.common.state.KeyedStateStore keyedStateStore)
public String getTaskName()
getTaskName 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.metrics.MetricGroup getMetricGroup()
getMetricGroup 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic int getNumberOfParallelSubtasks()
getNumberOfParallelSubtasks 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic int getMaxNumberOfParallelSubtasks()
getMaxNumberOfParallelSubtasks 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic int getIndexOfThisSubtask()
getIndexOfThisSubtask 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic int getAttemptNumber()
getAttemptNumber 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic String getTaskNameWithSubtasks()
getTaskNameWithSubtasks 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.ExecutionConfig getExecutionConfig()
getExecutionConfig 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic ClassLoader getUserCodeClassLoader()
getUserCodeClassLoader 在接口中 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 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic <V,A extends Serializable> org.apache.flink.api.common.accumulators.Accumulator<V,A> getAccumulator(String name)
getAccumulator 在接口中 org.apache.flink.api.common.functions.RuntimeContext@Deprecated public Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> getAllAccumulators()
getAllAccumulators 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.IntCounter getIntCounter(String name)
getIntCounter 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.LongCounter getLongCounter(String name)
getLongCounter 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.DoubleCounter getDoubleCounter(String name)
getDoubleCounter 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.accumulators.Histogram getHistogram(String name)
getHistogram 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic boolean hasBroadcastVariable(String name)
hasBroadcastVariable 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic <RT> List<RT> getBroadcastVariable(String name)
getBroadcastVariable 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic <T,C> C getBroadcastVariableWithInitializer(String name, org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer)
getBroadcastVariableWithInitializer 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic org.apache.flink.api.common.cache.DistributedCache getDistributedCache()
getDistributedCache 在接口中 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 在接口中 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 在接口中 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 在接口中 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 在接口中 org.apache.flink.api.common.functions.RuntimeContext@Deprecated public <T,ACC> org.apache.flink.api.common.state.FoldingState<T,ACC> getFoldingState(org.apache.flink.api.common.state.FoldingStateDescriptor<T,ACC> stateProperties)
getFoldingState 在接口中 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 在接口中 org.apache.flink.api.common.functions.RuntimeContextpublic List<org.apache.flink.api.common.state.StateDescriptor<?,?>> getStateDescriptors()
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.