Class BroadcastVariableManager
java.lang.Object
org.apache.flink.runtime.broadcast.BroadcastVariableManager
The BroadcastVariableManager is used to manage the materialization of broadcast variables.
References to materialized broadcast variables are cached and shared between parallel subtasks. A
reference count is maintained to track whether the materialization may be cleaned up.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint<T> BroadcastVariableMaterialization<T,?> materializeBroadcastVariable(String name, int superstep, BatchTask<?, ?> holder, MutableReader<?> reader, org.apache.flink.api.common.typeutils.TypeSerializerFactory<T> serializerFactory) Materializes the broadcast variable for the given name, scoped to the given task and its iteration superstep.voidreleaseAllReferencesFromTask(BatchTask<?, ?> referenceHolder) voidreleaseReference(String name, int superstep, BatchTask<?, ?> referenceHolder) voidreleaseReference(BroadcastVariableKey key, BatchTask<?, ?> referenceHolder)
-
Constructor Details
-
BroadcastVariableManager
public BroadcastVariableManager()
-
-
Method Details
-
materializeBroadcastVariable
public <T> BroadcastVariableMaterialization<T,?> materializeBroadcastVariable(String name, int superstep, BatchTask<?, ?> holder, MutableReader<?> reader, org.apache.flink.api.common.typeutils.TypeSerializerFactory<T> serializerFactory) throws IOExceptionMaterializes the broadcast variable for the given name, scoped to the given task and its iteration superstep. An existing materialization created by another parallel subtask may be returned, if it hasn't expired yet.- Throws:
IOException
-
releaseReference
-
releaseReference
-
releaseAllReferencesFromTask
-
getNumberOfVariablesWithReferences
public int getNumberOfVariablesWithReferences()
-