Package com.vmware.bdd.apitypes.TaskRead

Examples of com.vmware.bdd.apitypes.TaskRead.Status


               .getCurrentProgress(jobExecutionId));
      } else {
         jobStatus.setProgress(mainJobExecutionStatusHolder
               .getCurrentProgress(jobExecutionId));
      }
      Status status = null;
      switch (jobExecution.getStatus()) {
      case ABANDONED:
         status = Status.ABANDONED;
         break;
      case COMPLETED:
         status = Status.COMPLETED;
         break;
      case FAILED:
         status = Status.FAILED;
         break;
      case STARTED:
         status = Status.STARTED;
         break;
      case STARTING:
         status = Status.STARTING;
         break;
      case STOPPED:
         status = Status.STOPPED;
         break;
      case STOPPING:
         status = Status.STOPPING;
         break;
      case UNKNOWN:
      default:
         status = Status.UNKNOWN;
      }
      jobStatus.setStatus(status);
      if (subJobEnabled == 1) {
         List<NodeOperationStatus> succeedNodes =
               (ArrayList<NodeOperationStatus>) jobExecution.getExecutionContext()
                     .get(JobConstants.SUB_JOB_NODES_SUCCEED);
         List<NodeOperationStatus> failNodes =
               (ArrayList<NodeOperationStatus>) jobExecution.getExecutionContext()
                     .get(JobConstants.SUB_JOB_NODES_FAIL);
         if (succeedNodes != null) {
            jobStatus.setSucceedNodes(convert(succeedNodes));
         }
         if (failNodes != null) {
            jobStatus.setFailNodes(convert(failNodes));
         }
      }
      if (status.equals(Status.FAILED) && subJobEnabled != 1) {
         String workDir =
               TrackableTasklet.getFromJobExecutionContext(
                     jobExecution.getExecutionContext(),
                     JobConstants.CURRENT_COMMAND_WORK_DIR, String.class);
         String errorMessage =
View Full Code Here


   public TaskRead waitJobExecution(long jobExecutionId, long timeoutMs)
         throws TimeoutException {
      long start = System.currentTimeMillis();
      while (true) {
         TaskRead tr = getJobExecutionStatus(jobExecutionId);
         Status status = tr.getStatus();
         if (Status.ABANDONED.equals(status) || Status.COMPLETED.equals(status)
               || Status.FAILED.equals(status) || Status.STOPPED.equals(status)) {
            return tr;
         }
View Full Code Here

         String[] taskURIs = taskURI.toString().split("/");
         String taskId = taskURIs[taskURIs.length - 1];

         TaskRead taskRead;
         int oldProgress = 0;
         Status oldTaskStatus = null;
         Status taskStatus = null;
         int progress = 0;
         do {
            ResponseEntity<TaskRead> taskResponse =
                  restGetById(Constants.REST_PATH_TASK, taskId, TaskRead.class,
                        false);
View Full Code Here

TOP

Related Classes of com.vmware.bdd.apitypes.TaskRead.Status

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.