public class SparkRuntime extends com.google.common.util.concurrent.AbstractFuture<PipelineResult> implements PipelineExecution
PipelineExecution.Status| Constructor and Description |
|---|
SparkRuntime(SparkPipeline pipeline,
org.apache.spark.api.java.JavaSparkContext sparkContext,
org.apache.hadoop.conf.Configuration conf,
Map<PCollectionImpl<?>,Set<Target>> outputTargets,
Map<PCollectionImpl<?>,org.apache.crunch.materialize.MaterializableIterable> toMaterialize,
Map<PCollection<?>,org.apache.spark.storage.StorageLevel> toCache,
Map<PipelineCallable<?>,Set<Target>> allPipelineCallables) |
| Modifier and Type | Method and Description |
|---|---|
SparkRuntime |
execute() |
PipelineResult |
get() |
PipelineResult |
get(long timeout,
TimeUnit unit) |
CombineFn |
getCombineFn() |
org.apache.hadoop.conf.Configuration |
getConfiguration() |
Map<String,String> |
getNamedDotFiles()
Returns all .dot files that allows a client to graph the Crunch execution plan internals.
|
String |
getPlanDotFile()
Returns the .dot file that allows a client to graph the Crunch execution plan for this
pipeline.
|
PipelineResult |
getResult()
Retrieve the result of a pipeline if it has been completed, otherwise
null. |
SparkRuntimeContext |
getRuntimeContext() |
org.apache.spark.api.java.JavaSparkContext |
getSparkContext() |
PipelineExecution.Status |
getStatus() |
org.apache.spark.storage.StorageLevel |
getStorageLevel(PCollection<?> pcollection) |
boolean |
isValid(org.apache.spark.api.java.JavaRDDLike<?,?> rdd) |
void |
kill()
Kills the pipeline if it is running, no-op otherwise.
|
void |
setCombineFn(CombineFn combineFn) |
void |
waitFor(long timeout,
TimeUnit timeUnit)
Blocks until pipeline completes or the specified waiting time elapsed.
|
void |
waitUntilDone()
Blocks until pipeline completes, i.e.
|
addListener, cancel, isCancelled, isDoneequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcancel, isCancelled, isDonepublic SparkRuntime(SparkPipeline pipeline, org.apache.spark.api.java.JavaSparkContext sparkContext, org.apache.hadoop.conf.Configuration conf, Map<PCollectionImpl<?>,Set<Target>> outputTargets, Map<PCollectionImpl<?>,org.apache.crunch.materialize.MaterializableIterable> toMaterialize, Map<PCollection<?>,org.apache.spark.storage.StorageLevel> toCache, Map<PipelineCallable<?>,Set<Target>> allPipelineCallables)
public void setCombineFn(CombineFn combineFn)
public CombineFn getCombineFn()
public SparkRuntime execute()
public org.apache.spark.api.java.JavaSparkContext getSparkContext()
public SparkRuntimeContext getRuntimeContext()
public org.apache.hadoop.conf.Configuration getConfiguration()
public boolean isValid(org.apache.spark.api.java.JavaRDDLike<?,?> rdd)
public org.apache.spark.storage.StorageLevel getStorageLevel(PCollection<?> pcollection)
public String getPlanDotFile()
PipelineExecutiongetPlanDotFile in interface PipelineExecutionpublic Map<String,String> getNamedDotFiles()
PipelineExecutiongetNamedDotFiles in interface PipelineExecutionpublic void waitFor(long timeout,
TimeUnit timeUnit)
throws InterruptedException
PipelineExecutionwaitFor in interface PipelineExecutionInterruptedExceptionpublic void waitUntilDone()
throws InterruptedException
PipelineExecutionSUCCEEDED, FAILED or KILLED.waitUntilDone in interface PipelineExecutionInterruptedExceptionpublic PipelineResult get() throws InterruptedException, ExecutionException
get in interface Future<PipelineResult>get in class com.google.common.util.concurrent.AbstractFuture<PipelineResult>InterruptedExceptionExecutionExceptionpublic PipelineResult get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException
get in interface Future<PipelineResult>get in class com.google.common.util.concurrent.AbstractFuture<PipelineResult>InterruptedExceptionTimeoutExceptionExecutionExceptionpublic PipelineExecution.Status getStatus()
getStatus in interface PipelineExecutionpublic PipelineResult getResult()
PipelineExecutionnull.getResult in interface PipelineExecutionpublic void kill()
throws InterruptedException
PipelineExecutionPipelineExecution.waitUntilDone() after this call.kill in interface PipelineExecutionInterruptedExceptionCopyright © 2015 The Apache Software Foundation. All Rights Reserved.