Package org.apache.uima.ducc.transport.event.common.IDuccCompletionType

Examples of org.apache.uima.ducc.transport.event.common.IDuccCompletionType.JobCompletionType


 
  private void setCompletionIfNotAlreadySet(DuccId jobid, DuccWorkJob duccWorkJob, JobCompletionType reqJobCompletionType, IRationale reqRationale) {
    String methodName = "setCompletionIfNotAlreadySet";
    logger.trace(methodName, null, messages.fetch("enter"));
    try {
      JobCompletionType curJobCompletionType = duccWorkJob.getCompletionType();
      switch(curJobCompletionType) {
      case Undefined:
        duccWorkJob.setCompletion(reqJobCompletionType, reqRationale);
        logger.debug(methodName, jobid, "changed: "+curJobCompletionType+" to "+reqJobCompletionType);
        break;
View Full Code Here


            if(reason != null) {
              message += ": "+reason;
            }
          }
          IRationale rationale = new Rationale(message);
          JobCompletionType jobCompletionType = JobCompletionType.CanceledByUser;
          if(reqRole.equals(SpecificationProperties.key_role_administrator)) {
            jobCompletionType = JobCompletionType.CanceledByAdministrator;
          }
          stateManager.jobTerminate(duccWorkJob, jobCompletionType, rationale, ProcessDeallocationType.JobCanceled);
          OrchestratorCheckpoint.getInstance().saveState();
View Full Code Here

          default:
            type = "service";
            break;
          }
          IRationale rationale = new Rationale(type+" canceled by "+reqUser);
          JobCompletionType jobCompletionType = JobCompletionType.CanceledByUser;
          if(reqRole.equals(SpecificationProperties.key_role_administrator)) {
            jobCompletionType = JobCompletionType.CanceledByAdministrator;
          }
          stateManager.jobTerminate(duccWorkJob, jobCompletionType, rationale, ProcessDeallocationType.JobCanceled);
          OrchestratorCheckpoint.getInstance().saveState();
View Full Code Here

            } else {
                JobState          state = w.getJobState();
               
                if ( state == JobState.Completed ) {
                    sset.removeImplementor(id);
                    JobCompletionType jct = w.getCompletionType();
                       
                    logger.info(methodName, id, "Removing stopped instance from maps: state[", state, "] completion[", jct, "]");
                    switch ( jct ) {
                        case EndOfJob:
                        case CanceledByUser:
View Full Code Here

    try {
      jobid = job.getDuccId();
      String userName = job.getStandardInfo().getUser();
      String userLogDir = job.getUserLogsDir()+job.getDuccId().getFriendly()+File.separator;
      UserLogging userLogging = new UserLogging(userName, userLogDir);
      JobCompletionType jobCompletionType = job.getCompletionType();
      if(jobCompletionType != null) {
        text = "completion type: "+jobCompletionType.toString();
        userLogging.toUserDuccLog(text);
        logger.debug(methodName, job.getDuccId(), text);
      }
      IRationale rationale = job.getCompletionRationale();
      if(rationale != null) {
View Full Code Here

            multi = true;
            sb.append(monitor);
          }
        }
        else if(job.isCompleted()) {
          JobCompletionType jobCompletionType = job.getCompletionType();
          switch(jobCompletionType) {
          case EndOfJob:
            try {
              int total = job.getSchedulingInfo().getIntWorkItemsTotal();
              int done = job.getSchedulingInfo().getIntWorkItemsCompleted();
View Full Code Here

TOP

Related Classes of org.apache.uima.ducc.transport.event.common.IDuccCompletionType.JobCompletionType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.