コード例 #1
0
  private TaskStatusInfo fillTask(Task task) {

    List<GridProcessStatusInfo> processesList = new ArrayList<GridProcessStatusInfo>();

    for (GridProcess process : task.getGridProcesses()) {
      processesList.add(fillProcess(process));
    }

    TaskStatusInfo taskInfo =
        new TaskStatusInfo(
            task.getTaskid(),
            task.getJobId(),
            task.getState().toString(),
            task.getActualFails(),
            task.getSpec(),
            processesList,
            task.getCreationTime(),
            task.getFinalizationTime());

    return taskInfo;
  }
コード例 #2
0
  private List<GetOperationTO> fillFinalGetOperations(
      List<ProcessCommand> list, Task task, int processId, String workerID, long requestId) {
    List<GetOperationTO> getOperationsList = new ArrayList<GetOperationTO>();

    for (ProcessCommand process : list) {

      GetOperationTO to = new GetOperationTO();
      to.setEndTime(process.getTransferEnd());
      to.setInitTime(process.getTransferBegin());
      to.setJobID(task.getJobId());
      to.setLocalFilePath(process.getFileName());
      to.setProcessID(processId);
      to.setRemoteFilePath(process.getDestination());
      to.setRequestID2(requestId);
      to.setTaskID(task.getTaskid());
      to.setTransferDescription(process.getHandle().getDescription());
      to.setWorkerID2(workerID);
      to.setFileSize(process.getFileSize());

      getOperationsList.add(to);
    }

    return getOperationsList;
  }