public class StreamingRuntimeContext extends AbstractRuntimeUDFContext
RuntimeContext,
for streaming operators.| Constructor and Description |
|---|
StreamingRuntimeContext(AbstractStreamOperator<?> operator,
Environment env,
Map<String,Accumulator<?,?>> accumulators) |
| Modifier and Type | Method and Description |
|---|---|
<RT> List<RT> |
getBroadcastVariable(String name) |
<T,C> C |
getBroadcastVariableWithInitializer(String name,
BroadcastVariableInitializer<T,C> initializer) |
long |
getBufferTimeout()
Returns the buffer timeout of the job
|
CheckpointingMode |
getCheckpointMode()
Returns the checkpointing mode
|
InputSplitProvider |
getInputSplitProvider()
Returns the input split provider associated with the operator.
|
<S> OperatorState<S> |
getKeyValueState(String name,
Class<S> stateType,
S defaultState) |
<S> OperatorState<S> |
getKeyValueState(String name,
TypeInformation<S> stateType,
S defaultState) |
boolean |
isCheckpointingEnabled()
Returns true if checkpointing is enabled for the running job.
|
void |
registerTimer(long time,
Triggerable target)
Register a timer callback.
|
addAccumulator, getAccumulator, getAllAccumulators, getDistributedCache, getDoubleCounter, getExecutionConfig, getHistogram, getIndexOfThisSubtask, getIntCounter, getLongCounter, getNumberOfParallelSubtasks, getTaskName, getUserCodeClassLoaderpublic StreamingRuntimeContext(AbstractStreamOperator<?> operator, Environment env, Map<String,Accumulator<?,?>> accumulators)
public InputSplitProvider getInputSplitProvider()
public void 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 <T,C> C getBroadcastVariableWithInitializer(String name, BroadcastVariableInitializer<T,C> initializer)
public <S> OperatorState<S> getKeyValueState(String name, Class<S> stateType, S defaultState)
getKeyValueState in interface RuntimeContextgetKeyValueState in class AbstractRuntimeUDFContextpublic <S> OperatorState<S> getKeyValueState(String name, TypeInformation<S> stateType, S defaultState)
getKeyValueState in interface RuntimeContextgetKeyValueState in class AbstractRuntimeUDFContextpublic boolean isCheckpointingEnabled()
public CheckpointingMode getCheckpointMode()
public long getBufferTimeout()
Copyright © 2014–2016 The Apache Software Foundation. All rights reserved.