当前位置: 首页>>代码示例>>Java>>正文


Java Session.QUEUED_ACTIVE属性代码示例

本文整理汇总了Java中org.ggf.drmaa.Session.QUEUED_ACTIVE属性的典型用法代码示例。如果您正苦于以下问题:Java Session.QUEUED_ACTIVE属性的具体用法?Java Session.QUEUED_ACTIVE怎么用?Java Session.QUEUED_ACTIVE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.ggf.drmaa.Session的用法示例。


在下文中一共展示了Session.QUEUED_ACTIVE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: statustoString

public String statustoString(int jobstatus) {
    switch (jobstatus) {
        case Session.QUEUED_ACTIVE:
            return "Job is pending";
        case Session.SYSTEM_ON_HOLD:
            return "Job is on hold by system.";
        case Session.USER_ON_HOLD:
            return "Job is on hold by user.";
        case Session.USER_SYSTEM_ON_HOLD:
            return "Job is on hold by system or user.";
        case Session.RUNNING:
            return "Job is running";
        case Session.SYSTEM_SUSPENDED:
            return "Job is suspended by system.";
        case Session.USER_SUSPENDED:
            return "Job is suspended by user.";
        case Session.USER_SYSTEM_SUSPENDED:
            return "Job is suspended by system or user.";
        case Session.DONE:
            return "Job has completed";
        case Session.FAILED:
            return "Job has failed.";
    }
    return "Job status is unknown";
}
 
开发者ID:BiBiServ,项目名称:jobproxy,代码行数:25,代码来源:DRMAA.java

示例2: getRunningInstances

@Override
public int getRunningInstances() {
  int comp = 0;
  try {
    for (String job : jobs) {
      int status = session.getJobProgramStatus(job);

      comp += 1;

      //if( status == session.FAILED )
      //System.err.println( "[" + job + "] failed." );

      if (status == Session.QUEUED_ACTIVE || status == Session.DONE || status == Session.FAILED) {
        comp -= 1;
      }
    }
  } catch (DrmaaException e) {
    return 0;
  }

  return comp;
}
 
开发者ID:teanalab,项目名称:demidovii,代码行数:22,代码来源:DRMAAStageExecutor.java

示例3: getQueuedInstances

@Override
public int getQueuedInstances() {
  int queued = 0;
  try {
    for (String job : jobs) {
      int status = session.getJobProgramStatus(job);

      if (status == Session.QUEUED_ACTIVE) {
        queued += 1;
      }
    }
  } catch (DrmaaException e) {
    return 0;
  }

  return queued;
}
 
开发者ID:teanalab,项目名称:demidovii,代码行数:17,代码来源:DRMAAStageExecutor.java

示例4: isPending

@Override
public boolean isPending() throws IOException, InterruptedException, DrmaaException {
	int status = session.getJobProgramStatus(jobID);
	if(status == Session.QUEUED_ACTIVE) return true;
	if(status == Session.SYSTEM_ON_HOLD) return true;
	if(status == Session.USER_ON_HOLD) return true;
	if(status == Session.USER_SYSTEM_ON_HOLD) return true;
	return false;
}
 
开发者ID:mgarber,项目名称:scriptureV2,代码行数:9,代码来源:OGSJob.java

示例5: getJobProgramStatus

@Override
public int getJobProgramStatus(String jobId) throws DrmaaException {
    Job job = parseJobs(jobId).get(0);

    /**
     * PBS Professional S The job's state:
     *
     * B Array job has at least one subjob running.
     *
     * E Job is exiting after having run.
     *
     * F Job is finished.
     *
     * H Job is held.
     *
     * M Job was moved to another server.
     *
     * Q Job is queued.
     *
     * R Job is running.
     *
     * S Job is suspended.
     *
     * T Job is being moved to new location.
     *
     * U Cycle-harvesting job is suspended due to keyboard activity.
     *
     * W Job is waiting for its submitter-assigned start time to be reached.
     *
     * X Subjob has completed execution or has been deleted.
     *
     */
    String state = job.getState();
    LOGGER.finest("state : " + state);
    switch (state) {
    case "B":
        return Session.RUNNING;
    case "E":
        return Session.RUNNING;
    case "F":
        return job.getExitStatus() == 0 ? Session.DONE : Session.FAILED;
    case "H":
        return Session.SUSPEND;
    case "M":
        return Session.RUNNING;
    case "Q":
        return Session.QUEUED_ACTIVE;
    case "R":
        return Session.RUNNING;
    case "S":
        return Session.SUSPEND;
    case "T":
        return Session.RUNNING;
    case "U":
        return Session.SUSPEND;
    case "W":
        return Session.QUEUED_ACTIVE;
    case "X":
        return job.getExitStatus() == 0 ? Session.DONE : Session.FAILED;
    }
    return Session.UNDETERMINED;
}
 
开发者ID:biouno,项目名称:drmaa-pbs,代码行数:62,代码来源:SessionImpl.java


注:本文中的org.ggf.drmaa.Session.QUEUED_ACTIVE属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。