Class DistributedRuntimeUDFContext

    • Method Detail

      • hasBroadcastVariable

        public boolean hasBroadcastVariable​(String name)
        Description copied from interface: RuntimeContext
        Tests for the existence of the broadcast variable identified by the given name.
        Parameters:
        name - The name under which the broadcast variable is registered;
        Returns:
        Whether a broadcast variable exists for the given name.
      • getBroadcastVariable

        public <T> List<T> getBroadcastVariable​(String name)
        Description copied from interface: RuntimeContext
        Returns the result bound to the broadcast variable identified by the given name.

        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.

        Parameters:
        name - The name under which the broadcast variable is registered;
        Returns:
        The broadcast variable, materialized as a list of elements.
      • getBroadcastVariableWithInitializer

        public <T,​C> C getBroadcastVariableWithInitializer​(String name,
                                                                 BroadcastVariableInitializer<T,​C> initializer)
        Description copied from interface: RuntimeContext
        Returns the result bound to the broadcast variable identified by the given name. 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.

        Parameters:
        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.
        Returns:
        The broadcast variable, materialized as a list of elements.
      • getExternalResourceInfos

        public Set<ExternalResourceInfo> getExternalResourceInfos​(String resourceName)
        Description copied from interface: RuntimeContext
        Get the specific external resource information by the resourceName.
        Parameters:
        resourceName - of the required external resource
        Returns:
        information set of the external resource identified by the resourceName
      • clearBroadcastVariable

        public void clearBroadcastVariable​(String name)
      • clearAllBroadcastVariables

        public void clearAllBroadcastVariables()