Package org.apache.wayang.spark.channels
Class RddChannel.Instance
java.lang.Object
org.apache.wayang.core.util.AbstractReferenceCountable
org.apache.wayang.core.platform.ExecutionResourceTemplate
org.apache.wayang.core.platform.AbstractChannelInstance
org.apache.wayang.spark.channels.RddChannel.Instance
- All Implemented Interfaces:
ChannelInstance
,ExecutionResource
,ReferenceCountable
- Enclosing class:
- RddChannel
ChannelInstance
implementation for RddChannel
s.-
Constructor Summary
ConstructorsConstructorDescriptionInstance
(SparkExecutor executor, OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoid
accept
(org.apache.spark.api.java.JavaRDD<?> rdd, SparkExecutor sparkExecutor) protected void
Performs the actual disposing work of this instance.Optionally provides the measured cardinality of this instance.<T> org.apache.spark.api.java.JavaRDD<T>
Methods inherited from class org.apache.wayang.core.platform.AbstractChannelInstance
getLineage, getProducerOperatorContext, markProduced, setMeasuredCardinality, toString, wasProduced
Methods inherited from class org.apache.wayang.core.platform.ExecutionResourceTemplate
dispose, disposeUnreferenced
Methods inherited from class org.apache.wayang.core.util.AbstractReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReference
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.apache.wayang.core.platform.ChannelInstance
isMarkedForInstrumentation
Methods inherited from interface org.apache.wayang.core.platform.ExecutionResource
dispose
Methods inherited from interface org.apache.wayang.core.util.ReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReference
-
Constructor Details
-
Instance
public Instance(SparkExecutor executor, OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex)
-
-
Method Details
-
accept
public void accept(org.apache.spark.api.java.JavaRDD<?> rdd, SparkExecutor sparkExecutor) throws WayangException - Throws:
WayangException
-
provideRdd
public <T> org.apache.spark.api.java.JavaRDD<T> provideRdd() -
doDispose
protected void doDispose()Description copied from class:ExecutionResourceTemplate
Performs the actual disposing work of this instance.- Specified by:
doDispose
in classExecutionResourceTemplate
-
getMeasuredCardinality
Description copied from interface:ChannelInstance
Optionally provides the measured cardinality of this instance. However, such a cardinality might not be available for several reasons. For instance, the measurement might not have been requested or could not be implemented by the executingPlatform
.- Specified by:
getMeasuredCardinality
in interfaceChannelInstance
- Overrides:
getMeasuredCardinality
in classAbstractChannelInstance
- Returns:
- the measured cardinality if available
-
getChannel
- Returns:
- the
Channel
that is implemented by this instance
-