public class JobWaiter<T> extends Object implements JobListener
Constructor and Description |
---|
JobWaiter(DAGScheduler dagScheduler,
int jobId,
int totalTasks,
scala.Function2<Object,T,scala.runtime.BoxedUnit> resultHandler) |
Modifier and Type | Method and Description |
---|---|
JobResult |
awaitResult() |
void |
cancel()
Sends a signal to the DAGScheduler to cancel the job.
|
void |
jobFailed(Exception exception) |
boolean |
jobFinished() |
int |
jobId() |
void |
taskSucceeded(int index,
Object result) |
public JobWaiter(DAGScheduler dagScheduler, int jobId, int totalTasks, scala.Function2<Object,T,scala.runtime.BoxedUnit> resultHandler)
public int jobId()
public boolean jobFinished()
public void cancel()
public void taskSucceeded(int index, Object result)
taskSucceeded
in interface JobListener
public void jobFailed(Exception exception)
jobFailed
in interface JobListener
public JobResult awaitResult()