@Internal
public class StreamingRuntimeContext
extends org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext
RuntimeContext, for streaming
operators.| 构造器和说明 |
|---|
StreamingRuntimeContext(AbstractStreamOperator<?> operator,
org.apache.flink.runtime.execution.Environment env,
Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> accumulators) |
StreamingRuntimeContext(org.apache.flink.runtime.execution.Environment env,
Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> accumulators,
org.apache.flink.metrics.MetricGroup operatorMetricGroup,
org.apache.flink.runtime.jobgraph.OperatorID operatorID,
ProcessingTimeService processingTimeService,
org.apache.flink.api.common.state.KeyedStateStore keyedStateStore,
org.apache.flink.runtime.externalresource.ExternalResourceInfoProvider externalResourceInfoProvider) |
| 限定符和类型 | 方法和说明 |
|---|---|
<IN,ACC,OUT> |
getAggregatingState(org.apache.flink.api.common.state.AggregatingStateDescriptor<IN,ACC,OUT> stateProperties) |
<RT> List<RT> |
getBroadcastVariable(String name) |
<T,C> C |
getBroadcastVariableWithInitializer(String name,
org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer) |
CheckpointingMode |
getCheckpointMode()
Returns the checkpointing mode.
|
Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo> |
getExternalResourceInfos(String resourceName) |
org.apache.flink.runtime.taskexecutor.GlobalAggregateManager |
getGlobalAggregateManager()
Returns the global aggregate manager for the current job.
|
org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider |
getInputSplitProvider()
Returns the input split provider associated with the operator.
|
<T> org.apache.flink.api.common.state.ListState<T> |
getListState(org.apache.flink.api.common.state.ListStateDescriptor<T> stateProperties) |
<UK,UV> org.apache.flink.api.common.state.MapState<UK,UV> |
getMapState(org.apache.flink.api.common.state.MapStateDescriptor<UK,UV> stateProperties) |
String |
getOperatorUniqueID()
Returned value is guaranteed to be unique between operators within the same job and to be
stable and the same across job submissions.
|
ProcessingTimeService |
getProcessingTimeService() |
<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) |
org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo |
getTaskManagerRuntimeInfo()
Returns the task manager runtime info of the task manager running this stream task.
|
boolean |
hasBroadcastVariable(String name) |
boolean |
isCheckpointingEnabled()
Returns true if checkpointing is enabled for the running job.
|
void |
setKeyedStateStore(org.apache.flink.api.common.state.KeyedStateStore keyedStateStore) |
addAccumulator, getAccumulator, getAllAccumulators, getAllocationIDAsString, getAttemptNumber, getDistributedCache, getDoubleCounter, getExecutionConfig, getHistogram, getIndexOfThisSubtask, getIntCounter, getLongCounter, getMaxNumberOfParallelSubtasks, getMetricGroup, getNumberOfParallelSubtasks, getTaskName, getTaskNameWithSubtasks, getUserCodeClassLoader@VisibleForTesting public StreamingRuntimeContext(AbstractStreamOperator<?> operator, org.apache.flink.runtime.execution.Environment env, Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> accumulators)
public StreamingRuntimeContext(org.apache.flink.runtime.execution.Environment env,
Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> accumulators,
org.apache.flink.metrics.MetricGroup operatorMetricGroup,
org.apache.flink.runtime.jobgraph.OperatorID operatorID,
ProcessingTimeService processingTimeService,
@Nullable
org.apache.flink.api.common.state.KeyedStateStore keyedStateStore,
org.apache.flink.runtime.externalresource.ExternalResourceInfoProvider externalResourceInfoProvider)
public void setKeyedStateStore(@Nullable org.apache.flink.api.common.state.KeyedStateStore keyedStateStore)
public org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider getInputSplitProvider()
public ProcessingTimeService getProcessingTimeService()
public org.apache.flink.runtime.taskexecutor.GlobalAggregateManager getGlobalAggregateManager()
public String getOperatorUniqueID()
This operation is currently only supported in Streaming (DataStream) contexts.
public org.apache.flink.runtime.taskmanager.TaskManagerRuntimeInfo getTaskManagerRuntimeInfo()
public Set<org.apache.flink.api.common.externalresource.ExternalResourceInfo> getExternalResourceInfos(String resourceName)
public boolean hasBroadcastVariable(String name)
public <T,C> C getBroadcastVariableWithInitializer(String name, org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer)
public <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.RuntimeContextgetState 在类中 org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContextpublic <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.RuntimeContextgetListState 在类中 org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContextpublic <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.RuntimeContextgetReducingState 在类中 org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContextpublic <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.RuntimeContextgetAggregatingState 在类中 org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContextpublic <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.RuntimeContextgetMapState 在类中 org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContextpublic boolean isCheckpointingEnabled()
public CheckpointingMode getCheckpointMode()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.