@PublicEvolving
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) |
| Modifier and Type | Method and Description |
|---|---|
<RT> List<RT> |
getBroadcastVariable(String name) |
<T,C> C |
getBroadcastVariableWithInitializer(String name,
org.apache.flink.api.common.functions.BroadcastVariableInitializer<T,C> initializer) |
long |
getBufferTimeout()
Returns the buffer timeout of the job
|
CheckpointingMode |
getCheckpointMode()
Returns the checkpointing mode
|
long |
getCurrentProcessingTime()
Returns the current processing time as defined by the task's
TimeServiceProvider |
org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider |
getInputSplitProvider()
Returns the input split provider associated with the operator.
|
<S> org.apache.flink.api.common.state.OperatorState<S> |
getKeyValueState(String name,
Class<S> stateType,
S defaultState)
Deprecated.
|
<S> org.apache.flink.api.common.state.OperatorState<S> |
getKeyValueState(String name,
org.apache.flink.api.common.typeinfo.TypeInformation<S> stateType,
S defaultState)
Deprecated.
|
<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.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) |
boolean |
hasBroadcastVariable(String name) |
boolean |
isCheckpointingEnabled()
Returns true if checkpointing is enabled for the running job.
|
ScheduledFuture<?> |
registerTimer(long time,
Triggerable target)
Register a timer callback.
|
addAccumulator, getAccumulator, getAllAccumulators, getAttemptNumber, getDistributedCache, getDoubleCounter, getExecutionConfig, getHistogram, getIndexOfThisSubtask, getIntCounter, getLongCounter, getMetricGroup, getNumberOfParallelSubtasks, getTaskName, getTaskNameWithSubtasks, getUserCodeClassLoaderpublic StreamingRuntimeContext(AbstractStreamOperator<?> operator, org.apache.flink.runtime.execution.Environment env, Map<String,org.apache.flink.api.common.accumulators.Accumulator<?,?>> accumulators)
public org.apache.flink.runtime.jobgraph.tasks.InputSplitProvider getInputSplitProvider()
public ScheduledFuture<?> registerTimer(long time, Triggerable target)
Triggerable will be invoked.
This call is guaranteed to not happen concurrently with method calls on the operator.time - The absolute time in milliseconds.target - The target to be triggered.public long getCurrentProcessingTime()
TimeServiceProviderpublic 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.RuntimeContextgetState in class 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 in interface org.apache.flink.api.common.functions.RuntimeContextgetListState in class 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 in interface org.apache.flink.api.common.functions.RuntimeContextgetReducingState in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext@Deprecated public <S> org.apache.flink.api.common.state.OperatorState<S> getKeyValueState(String name, Class<S> stateType, S defaultState)
getKeyValueState in interface org.apache.flink.api.common.functions.RuntimeContextgetKeyValueState in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContext@Deprecated public <S> org.apache.flink.api.common.state.OperatorState<S> getKeyValueState(String name, org.apache.flink.api.common.typeinfo.TypeInformation<S> stateType, S defaultState)
getKeyValueState in interface org.apache.flink.api.common.functions.RuntimeContextgetKeyValueState in class org.apache.flink.api.common.functions.util.AbstractRuntimeUDFContextpublic boolean isCheckpointingEnabled()
public CheckpointingMode getCheckpointMode()
public long getBufferTimeout()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.