import compbio.engine.Configurator;\r
import compbio.engine.SubmissionManager;\r
import compbio.engine.client.ConfiguredExecutable;\r
-import compbio.engine.client.Util;\r
+import compbio.engine.client.EngineUtil;\r
import compbio.metadata.JobStatus;\r
import compbio.metadata.JobSubmissionException;\r
import compbio.metadata.ResultNotAvailableException;\r
\r
@Override\r
public boolean cancelJob(String jobId) {\r
- Future<ConfiguredExecutable<?>> future = SubmissionManager\r
- .getTask(jobId);\r
+ Future<ConfiguredExecutable<?>> future = SubmissionManager.getTask(jobId);\r
// The job has already finished or cancelled.\r
if (future == null) {\r
log.debug("Did not find future for local job "\r
\r
@Override\r
public JobStatus getJobStatus(String jobId) {\r
- Future<ConfiguredExecutable<?>> future = SubmissionManager\r
- .getTask(jobId);\r
+ Future<ConfiguredExecutable<?>> future = SubmissionManager.getTask(jobId);\r
if (future == null) {\r
return LocalEngineUtil.getRecordedJobStatus(jobId);\r
}\r
Future<ConfiguredExecutable<?>> future = lrunner.getFuture();\r
\r
if (future == null) {\r
- throw new RuntimeException("Future is NULL for executable "\r
- + executable);\r
+ throw new RuntimeException("Future is NULL for executable " + executable);\r
}\r
SubmissionManager.addTask(executable, future);\r
return executable.getTaskId();\r
try {\r
cexec = future.get();\r
} catch (InterruptedException e) {\r
- log.error("Cannot clean up as calculation was not completed!"\r
- + e.getLocalizedMessage());\r
+ log.error("Cannot clean up as calculation was not completed!" + e.getLocalizedMessage());\r
} catch (ExecutionException e) {\r
- log.error("Cannot clean up due to ExecutionException "\r
- + e.getLocalizedMessage());\r
+ log.error("Cannot clean up due to ExecutionException " + e.getLocalizedMessage());\r
}\r
if (cexec == null) {\r
return false;\r
@Override\r
public ConfiguredExecutable<?> getResults(String taskId)\r
throws ResultNotAvailableException {\r
- if (!Util.isValidJobId(taskId)) {\r
+ if (!EngineUtil.isValidJobId(taskId)) {\r
// TODO should I be throwing something else?\r
throw new IllegalArgumentException(taskId);\r
}\r
// If task was not find in the list of jobs, than it must have been\r
// collected already\r
// Resurrect the job to find out there the output is\r
- ConfiguredExecutable<?> exec = compbio.engine.client.Util\r
- .loadExecutable(taskId);\r
+ ConfiguredExecutable<?> exec = EngineUtil.loadExecutable(taskId);\r
return exec;\r
}\r
return LocalEngineUtil.getResults(futureExec, taskId);\r