Package org.apache.wayang.spark.channels
Class DatasetChannel.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.DatasetChannel.Instance
- All Implemented Interfaces:
ChannelInstance,ExecutionResource,ReferenceCountable
- Enclosing class:
- DatasetChannel
-
Constructor Summary
ConstructorsConstructorDescriptionInstance(SparkExecutor executor, OptimizationContext.OperatorContext producerOperatorContext, int producerOutputIndex) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> dataset, SparkExecutor sparkExecutor) Store aDatasetin this channel and optionally measure its cardinality.protected voidPerforms the actual disposing work of this instance.org.apache.spark.sql.Dataset<org.apache.spark.sql.Row>Provide the storedDataset.Methods inherited from class org.apache.wayang.core.platform.AbstractChannelInstance
getLineage, getMeasuredCardinality, getProducerOperatorContext, markProduced, setMeasuredCardinality, toString, wasProducedMethods inherited from class org.apache.wayang.core.platform.ExecutionResourceTemplate
dispose, disposeUnreferencedMethods inherited from class org.apache.wayang.core.util.AbstractReferenceCountable
disposeIfUnreferenced, getNumReferences, isDisposed, noteDiscardedReference, noteObtainedReferenceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.wayang.core.platform.ChannelInstance
isMarkedForInstrumentationMethods inherited from interface org.apache.wayang.core.platform.ExecutionResource
disposeMethods 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.sql.Dataset<org.apache.spark.sql.Row> dataset, SparkExecutor sparkExecutor) Store aDatasetin this channel and optionally measure its cardinality.- Parameters:
dataset- theDatasetto storesparkExecutor- theSparkExecutorhandling this channel
-
provideDataset
public org.apache.spark.sql.Dataset<org.apache.spark.sql.Row> provideDataset()Provide the storedDataset.- Returns:
- the stored
Dataset
-
doDispose
protected void doDispose()Description copied from class:ExecutionResourceTemplatePerforms the actual disposing work of this instance.- Specified by:
doDisposein classExecutionResourceTemplate
-
getChannel
- Returns:
- the
Channelthat is implemented by this instance
-