Class SparkExecutionContext
- java.lang.Object
-
- org.apache.wayang.spark.execution.SparkExecutionContext
-
- All Implemented Interfaces:
java.io.Serializable,ExecutionContext
public class SparkExecutionContext extends java.lang.Object implements ExecutionContext, java.io.Serializable
ExecutionContextimplementation for theSparkPlatform.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description SparkExecutionContext(int iterationNumber)Creates a new instance.SparkExecutionContext(SparkExecutionOperator operator, ChannelInstance[] inputs, int iterationNumber)Creates a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> java.util.Collection<T>getBroadcast(java.lang.String name)Accesses a broadcast.intgetCurrentIteration()If this instance reflects the state of execution inside of aLoopSubplan, then retrieve the number of the current iteration.
-
-
-
Constructor Detail
-
SparkExecutionContext
public SparkExecutionContext(SparkExecutionOperator operator, ChannelInstance[] inputs, int iterationNumber)
Creates a new instance.- Parameters:
operator-SparkExecutionOperatorfor that the instance should be createdinputs-ChannelInstanceinputs for theoperator
-
SparkExecutionContext
public SparkExecutionContext(int iterationNumber)
Creates a new instance.
-
-
Method Detail
-
getBroadcast
public <T> java.util.Collection<T> getBroadcast(java.lang.String name)
Description copied from interface:ExecutionContextAccesses a broadcast.- Specified by:
getBroadcastin interfaceExecutionContext- Type Parameters:
T- type of the broadcast- Parameters:
name- name of the broadcast- Returns:
- the broadcast
-
getCurrentIteration
public int getCurrentIteration()
Description copied from interface:ExecutionContextIf this instance reflects the state of execution inside of aLoopSubplan, then retrieve the number of the current iteration.- Specified by:
getCurrentIterationin interfaceExecutionContext- Returns:
- the iteration number, start at
0, or-1if there is no surroundingLoopSubplan
-
-