This project has retired. For details please refer to its Attic page.
PipelineExecution (Apache Crunch 0.10.0 API)

org.apache.crunch
Interface PipelineExecution

All Superinterfaces:
Future<PipelineResult>, com.google.common.util.concurrent.ListenableFuture<PipelineResult>
All Known Subinterfaces:
MRPipelineExecution
All Known Implementing Classes:
SparkRuntime

public interface PipelineExecution
extends com.google.common.util.concurrent.ListenableFuture<PipelineResult>

A handle to allow clients to control a Crunch pipeline as it runs. This interface is thread-safe.


Nested Class Summary
static class PipelineExecution.Status
           
 
Method Summary
 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.
 PipelineExecution.Status getStatus()
           
 void kill()
          Kills the pipeline if it is running, no-op otherwise.
 void waitFor(long timeout, TimeUnit timeUnit)
          Blocks until pipeline completes or the specified waiting time elapsed.
 void waitUntilDone()
          Blocks until pipeline completes, i.e.
 
Methods inherited from interface com.google.common.util.concurrent.ListenableFuture
addListener
 
Methods inherited from interface java.util.concurrent.Future
cancel, get, get, isCancelled, isDone
 

Method Detail

getPlanDotFile

String getPlanDotFile()
Returns the .dot file that allows a client to graph the Crunch execution plan for this pipeline.


waitFor

void waitFor(long timeout,
             TimeUnit timeUnit)
             throws InterruptedException
Blocks until pipeline completes or the specified waiting time elapsed.

Throws:
InterruptedException

waitUntilDone

void waitUntilDone()
                   throws InterruptedException
Blocks until pipeline completes, i.e. SUCCEEDED, FAILED or KILLED.

Throws:
InterruptedException

getStatus

PipelineExecution.Status getStatus()

getResult

PipelineResult getResult()
Retrieve the result of a pipeline if it has been completed, otherwise null.


kill

void kill()
          throws InterruptedException
Kills the pipeline if it is running, no-op otherwise. This method only delivers a kill signal to the pipeline, and does not guarantee the pipeline exits on return. To wait for completely exits, use waitUntilDone() after this call.

Throws:
InterruptedException


Copyright © 2014 The Apache Software Foundation. All Rights Reserved.