@Internal
public class StreamingRuntimeContext
extends org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext
RuntimeContext
, for streaming
operators.Constructor and Description |
---|
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.groups.OperatorMetricGroup 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) |
Modifier and Type | Method and Description |
---|---|
<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.
|
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) |
<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, getAllocationIDAsString, getAttemptNumber, getDistributedCache, getDoubleCounter, getExecutionConfig, getHistogram, getIndexOfThisSubtask, getIntCounter, getLongCounter, getMaxNumberOfParallelSubtasks, getMetricGroup, getNumberOfParallelSubtasks, getTaskName, getTaskNameWithSubtasks, getUserCodeClassLoader, registerUserCodeClassLoaderReleaseHookIfAbsent
@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.groups.OperatorMetricGroup 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 org.apache.flink.api.common.JobID getJobId()
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
in interface org.apache.flink.api.common.functions.RuntimeContext
getState
in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext
public <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.RuntimeContext
getListState
in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext
public <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.RuntimeContext
getReducingState
in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext
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)
getAggregatingState
in interface org.apache.flink.api.common.functions.RuntimeContext
getAggregatingState
in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext
public <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.RuntimeContext
getMapState
in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext
public boolean isCheckpointingEnabled()
public CheckpointingMode getCheckpointMode()
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.