@Internal public class RuntimeUDFContext extends AbstractRuntimeUDFContext
RuntimeContext, created by runtime UDF operators.| Constructor and Description |
|---|
RuntimeUDFContext(TaskInfo taskInfo,
ClassLoader userCodeClassLoader,
ExecutionConfig executionConfig,
Map<String,Future<Path>> cpTasks,
Map<String,Accumulator<?,?>> accumulators,
org.apache.flink.metrics.MetricGroup metrics) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearAllBroadcastVariables() |
void |
clearBroadcastVariable(String name) |
<RT> List<RT> |
getBroadcastVariable(String name)
Returns the result bound to the broadcast variable identified by the
given
name. |
<T,C> C |
getBroadcastVariableWithInitializer(String name,
BroadcastVariableInitializer<T,C> initializer)
Returns the result bound to the broadcast variable identified by the
given
name. |
boolean |
hasBroadcastVariable(String name)
Tests for the existence of the broadcast variable identified by the
given
name. |
void |
setBroadcastVariable(String name,
List<?> value) |
addAccumulator, getAccumulator, getAggregatingState, getAllAccumulators, getAllocationIDAsString, getAttemptNumber, getDistributedCache, getDoubleCounter, getExecutionConfig, getFoldingState, getHistogram, getIndexOfThisSubtask, getIntCounter, getListState, getLongCounter, getMapState, getMaxNumberOfParallelSubtasks, getMetricGroup, getNumberOfParallelSubtasks, getReducingState, getState, getTaskName, getTaskNameWithSubtasks, getUserCodeClassLoaderpublic RuntimeUDFContext(TaskInfo taskInfo, ClassLoader userCodeClassLoader, ExecutionConfig executionConfig, Map<String,Future<Path>> cpTasks, Map<String,Accumulator<?,?>> accumulators, org.apache.flink.metrics.MetricGroup metrics)
public boolean hasBroadcastVariable(String name)
RuntimeContextname.name - The name under which the broadcast variable is registered;public <RT> List<RT> getBroadcastVariable(String name)
RuntimeContextname.
IMPORTANT: The broadcast variable data structure is shared between the parallel tasks on one machine. Any access that modifies its internal state needs to be manually synchronized by the caller.
name - The name under which the broadcast variable is registered;public <T,C> C getBroadcastVariableWithInitializer(String name, BroadcastVariableInitializer<T,C> initializer)
RuntimeContextname. The broadcast variable is returned as a shared data structure
that is initialized with the given BroadcastVariableInitializer.
IMPORTANT: The broadcast variable data structure is shared between the parallel tasks on one machine. Any access that modifies its internal state needs to be manually synchronized by the caller.
name - The name under which the broadcast variable is registered;initializer - The initializer that creates the shared data structure of the broadcast
variable from the sequence of elements.public void clearBroadcastVariable(String name)
public void clearAllBroadcastVariables()
Copyright © 2014–2018 The Apache Software Foundation. All rights reserved.