Class SparkExecutionContext

java.lang.Object
org.apache.wayang.spark.execution.SparkExecutionContext
All Implemented Interfaces:
Serializable, ExecutionContext

public class SparkExecutionContext extends Object implements ExecutionContext, Serializable
ExecutionContext implementation for the SparkPlatform.
See Also:
  • Constructor Details

    • SparkExecutionContext

      public SparkExecutionContext(SparkExecutionOperator operator, ChannelInstance[] inputs, int iterationNumber)
      Creates a new instance.
      Parameters:
      operator - SparkExecutionOperator for that the instance should be created
      inputs - ChannelInstance inputs for the operator
    • SparkExecutionContext

      public SparkExecutionContext(int iterationNumber)
      Creates a new instance.
  • Method Details

    • getBroadcast

      public <T> Collection<T> getBroadcast(String name)
      Description copied from interface: ExecutionContext
      Accesses a broadcast.
      Specified by:
      getBroadcast in interface ExecutionContext
      Type Parameters:
      T - type of the broadcast
      Parameters:
      name - name of the broadcast
      Returns:
      the broadcast
    • getCurrentIteration

      public int getCurrentIteration()
      Description copied from interface: ExecutionContext
      If this instance reflects the state of execution inside of a LoopSubplan, then retrieve the number of the current iteration.
      Specified by:
      getCurrentIteration in interface ExecutionContext
      Returns:
      the iteration number, start at 0, or -1 if there is no surrounding LoopSubplan