public class AsyncClusterRunner extends java.lang.Object implements AsyncExecutor
| Modifier and Type | Field and Description |
|---|---|
private static org.apache.log4j.Logger |
log |
| Constructor and Description |
|---|
AsyncClusterRunner() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
cancelJob(java.lang.String jobId)
Stop running job.
|
boolean |
cleanup(java.lang.String jobId)
Remove all files and a job directory for a jobid.
|
JobStatus |
getJobStatus(java.lang.String jobId)
Query the status of the job
|
ConfiguredExecutable<?> |
getResults(java.lang.String jobId)
Retrieve the results of the job.
|
java.lang.String |
getWorkDirectory(java.lang.String jobId) |
java.lang.String |
submitJob(ConfiguredExecutable<?> executable)
Submits job for the execution
Immediate execution is not guaranteed, this method puts the job in the queue.
|
public java.lang.String submitJob(ConfiguredExecutable<?> executable) throws JobSubmissionException
AsyncExecutorsubmitJob in interface AsyncExecutorJobSubmissionException - if submission fails. This usually happens due to the problem on a server side.public boolean cancelJob(java.lang.String jobId)
AsyncExecutorcancelJob in interface AsyncExecutorpublic JobStatus getJobStatus(java.lang.String jobId)
AsyncExecutorgetJobStatus in interface AsyncExecutorJobStatuspublic boolean cleanup(java.lang.String jobId)
AsyncExecutorcleanup in interface AsyncExecutorpublic ConfiguredExecutable<?> getResults(java.lang.String jobId) throws ResultNotAvailableException
AsyncExecutorgetResults in interface AsyncExecutorjobId - job identifier obtained at the job submissionResultNotAvailableException - if the result is not available for whatever reason.
Could be due to execution failure, or due to the results being removed from the server at
the time of request.public java.lang.String getWorkDirectory(java.lang.String jobId)
getWorkDirectory in interface AsyncExecutorjobId - unique job identifier