public class EvaluationContext extends Object
PObject<T>s or PCollection<T>s and Ts or DStreams/RDDs of Ts.| Constructor and Description |
|---|
EvaluationContext(org.apache.spark.api.java.JavaSparkContext jsc,
Pipeline pipeline,
PipelineOptions options) |
EvaluationContext(org.apache.spark.api.java.JavaSparkContext jsc,
Pipeline pipeline,
PipelineOptions options,
org.apache.spark.streaming.api.java.JavaStreamingContext jssc) |
| Modifier and Type | Method and Description |
|---|---|
Dataset |
borrowDataset(PTransform<? extends PValue,?> transform) |
Dataset |
borrowDataset(PValue pvalue) |
void |
computeOutputs()
Computes the outputs for all RDDs that are leaves in the DAG and do not have any actions (like
saving to a file) registered on them (i.e.
|
<T> T |
get(PValue value)
Retrieve an object of Type T associated with the PValue passed in.
|
Map<PCollection,Long> |
getCacheCandidates()
Get the map of cache candidates hold by the evaluation context.
|
AppliedPTransform<?,?,?> |
getCurrentTransform() |
<T extends PValue> |
getInput(PTransform<T,?> transform) |
<T> Map<TupleTag<?>,PValue> |
getInputs(PTransform<?,?> transform) |
PipelineOptions |
getOptions() |
<T extends PValue> |
getOutput(PTransform<?,T> transform) |
Map<TupleTag<?>,PValue> |
getOutputs(PTransform<?,?> transform) |
Pipeline |
getPipeline() |
SparkPCollectionView |
getPViews()
Retrun the current views creates in the pipepline.
|
SparkRuntimeContext |
getRuntimeContext() |
org.apache.spark.api.java.JavaSparkContext |
getSparkContext() |
org.apache.spark.streaming.api.java.JavaStreamingContext |
getStreamingContext() |
void |
putDataset(PTransform<?,? extends PValue> transform,
Dataset dataset) |
void |
putDataset(PValue pvalue,
Dataset dataset) |
void |
putPView(PCollectionView<?> view,
Iterable<WindowedValue<?>> value,
Coder<Iterable<WindowedValue<?>>> coder)
Adds/Replaces a view to the current views creates in the pipepline.
|
void |
setCurrentTransform(AppliedPTransform<?,?,?> transform) |
public EvaluationContext(org.apache.spark.api.java.JavaSparkContext jsc,
Pipeline pipeline,
PipelineOptions options)
public EvaluationContext(org.apache.spark.api.java.JavaSparkContext jsc,
Pipeline pipeline,
PipelineOptions options,
org.apache.spark.streaming.api.java.JavaStreamingContext jssc)
public org.apache.spark.api.java.JavaSparkContext getSparkContext()
public org.apache.spark.streaming.api.java.JavaStreamingContext getStreamingContext()
public Pipeline getPipeline()
public PipelineOptions getOptions()
public SparkRuntimeContext getRuntimeContext()
public void setCurrentTransform(AppliedPTransform<?,?,?> transform)
public AppliedPTransform<?,?,?> getCurrentTransform()
public <T extends PValue> T getInput(PTransform<T,?> transform)
public <T> Map<TupleTag<?>,PValue> getInputs(PTransform<?,?> transform)
public <T extends PValue> T getOutput(PTransform<?,T> transform)
public Map<TupleTag<?>,PValue> getOutputs(PTransform<?,?> transform)
public void putDataset(PTransform<?,? extends PValue> transform, Dataset dataset)
public Dataset borrowDataset(PTransform<? extends PValue,?> transform)
public void computeOutputs()
public <T> T get(PValue value)
T - Type of object to return.value - PValue to retrieve associated data for.public SparkPCollectionView getPViews()
public void putPView(PCollectionView<?> view, Iterable<WindowedValue<?>> value, Coder<Iterable<WindowedValue<?>>> coder)
view - - Identifier of the viewvalue - - Actual value of the viewcoder - - Coder of the valuepublic Map<PCollection,Long> getCacheCandidates()
Map of cache candidates.Copyright © 2016–2017 The Apache Software Foundation. All rights reserved.