本文整理汇总了Java中org.ggf.drmaa.JobInfo类的典型用法代码示例。如果您正苦于以下问题:Java JobInfo类的具体用法?Java JobInfo怎么用?Java JobInfo使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JobInfo类属于org.ggf.drmaa包,在下文中一共展示了JobInfo类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: waitForStatus
import org.ggf.drmaa.JobInfo; //导入依赖的package包/类
private static String waitForStatus(Session session, String jobId) throws DrmaaException {
JobInfo jobInfo = session.wait(jobId, Session.TIMEOUT_WAIT_FOREVER);
if (jobInfo.wasAborted()) {
return RunStatus.ABORTED;
}
if (jobInfo.hasExited()) {
return null;
}
if (jobInfo.hasSignaled()) {
return RunStatus.SIGNALLED;
}
return RunStatus.DISAPPEARED;
}
示例2: checkJob
import org.ggf.drmaa.JobInfo; //导入依赖的package包/类
private void checkJob(FailAction fail, JobSpecification js) throws DrmaaException {
String id = js.getJobId();
int status = session.getJobProgramStatus(id);
if (status == Session.DONE) {
JobInfo info = session.wait(id, Session.TIMEOUT_NO_WAIT);
if (info.wasAborted()) {
logger.warning(js.getJobMessage("was aborted"));
fail(fail, js);
return;
}
if (info.hasSignaled()) {
logger.warning(js.getJobMessage("signalled " + info.getTerminatingSignal()));
fail(fail, js);
return;
}
if (info.getExitStatus() != 0) {
logger.warning(js.getJobMessage("exited with status " + info.getExitStatus()));
fail(fail, js);
return;
}
logger.info(js.getJobMessage("is done"));
currentJobs.remove(id);
return;
}
if (status == Session.FAILED) {
logger.warning(js.getJobMessage("failed somehow"));
fail(fail, js);
}
}
示例3: jobToJobInfo
import org.ggf.drmaa.JobInfo; //导入依赖的package包/类
private JobInfo jobToJobInfo(Job job) {
return new JobInfoImpl(job.getId(), job.getResourcesUsed(), job.getState().equals("F") || job.getState().equals("X"),
job.getExitStatus(), "", // TODO
false, // TODO
false, // TODO
false // TODO
);
}
示例4: wait
import org.ggf.drmaa.JobInfo; //导入依赖的package包/类
@Override
public JobInfo wait(String jobId, long timeout) throws DrmaaException {
LOGGER.log(Level.FINEST, "wait");
JobInfo jobInfo = jobToJobInfo(parseJobs(jobId).get(0));
while (!jobInfo.hasExited()) {
try {
Thread.sleep(2000); // 1000 milliseconds is one second.
} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
}
jobInfo = jobToJobInfo(parseJobs(jobId).get(0));
}
return jobInfo;
}
示例5: wait
import org.ggf.drmaa.JobInfo; //导入依赖的package包/类
@Override
public JobInfo wait(String arg0, long arg1) throws DrmaaException {
throw new NotImplementedException();
}