Package org.apache.airavata.registry.cpi

Examples of org.apache.airavata.registry.cpi.CompositeIdentifier


            WorkflowNodeStatus workflowNodeStatus = nodeDetails.getWorkflowNodeStatus();
            if (workflowNodeStatus != null){
                if (isWFNodeExist(nodeId)){
                    updateWorkflowNodeStatus(workflowNodeStatus, nodeId);
                }else {
                    CompositeIdentifier ids = new CompositeIdentifier(expID, nodeId);
                    addWorkflowNodeStatus(workflowNodeStatus,ids);
                }
            }
            List<TaskDetails> taskDetails = nodeDetails.getTaskDetailsList();
            if (taskDetails != null && !taskDetails.isEmpty()){
View Full Code Here


            }

            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
            if (jobDetailsList != null && !jobDetailsList.isEmpty()){
                for (JobDetails job : jobDetailsList){
                    CompositeIdentifier ids = new CompositeIdentifier(taskDetail.getTaskId(), job.getJobID());
                    addJobDetails(job,ids);
                }
            }

            List<DataTransferDetails> dataTransferDetailsList = taskDetails.getDataTransferDetailsList();
            if (dataTransferDetailsList != null && !dataTransferDetailsList.isEmpty()){
                for (DataTransferDetails transferDetails : dataTransferDetailsList){
                    addDataTransferDetails(transferDetails, taskDetail.getTaskId());
                }
            }

            List<ErrorDetails> errors = taskDetails.getErrors();
            if (errors != null && !errors.isEmpty()){
                for (ErrorDetails error : errors){
                    addErrorDetails(error, taskDetail.getTaskId());
                }
            }

            TaskStatus taskStatus = taskDetails.getTaskStatus();
            CompositeIdentifier ids = new CompositeIdentifier(nodeId, taskDetail.getTaskId());
            if (taskStatus != null){
                if (taskStatus.getExecutionState() != null){
                    addTaskStatus(taskStatus, ids);
                }else {
                    taskStatus.setExecutionState(TaskState.UNKNOWN);
View Full Code Here

                updateOutputDataHandling(outputDataHandling, taskDetail);
            }
            List<JobDetails> jobDetailsList = taskDetails.getJobDetailsList();
            if (jobDetailsList != null && !jobDetailsList.isEmpty()){
                for (JobDetails job : jobDetailsList){
                    CompositeIdentifier ids = new CompositeIdentifier(taskId, job.getJobID());
                    updateJobDetails(job, ids);
                }
            }

            List<DataTransferDetails> dataTransferDetailsList = taskDetails.getDataTransferDetailsList();
View Full Code Here

            if (transferStatus != null){
                TransferStatus status = getDataTransferStatus(transferId);
                if (status != null){
                    updateTransferStatus(transferStatus, transferId);
                }else {
                    CompositeIdentifier ids = new CompositeIdentifier(taskId, transferId);
                    addTransferStatus(transferStatus, ids);
                }
            }
            return resource.getTransferId();
        } catch (Exception e) {
View Full Code Here

            if (transferStatus != null){
                TransferStatus status = getDataTransferStatus(transferId);
                if (status != null){
                    updateTransferStatus(transferStatus, transferId);
                }else {
                    CompositeIdentifier ids = new CompositeIdentifier(taskId, transferId);
                    addTransferStatus(transferStatus, ids);
                }
            }
            return resource.getTransferId();
        } catch (Exception e) {
View Full Code Here

                    errorResource.setExperimentResource(taskDetail.getWorkflowNodeDetailResource().getExperimentResource());
                } else {
                    logger.error("The id provided is not an experiment id or a workflow id or a task id..");
                }
            } else if (id instanceof CompositeIdentifier) {
                CompositeIdentifier cid = (CompositeIdentifier) id;
                if (isJobDetailExist(cid)) {
                    experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
                    workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
                    taskDetail = workflowNode.getTaskDetail((String) cid.getTopLevelIdentifier());
                    JobDetailResource jobDetail = taskDetail.getJobDetail((String) cid.getSecondLevelIdentifier());
                    errorResource = (ErrorDetailResource) jobDetail.create(ResourceType.ERROR_DETAIL);
                    errorResource.setTaskDetailResource(taskDetail);
                    errorResource.setNodeDetail(taskDetail.getWorkflowNodeDetailResource());
                    errorResource.setExperimentResource(taskDetail.getWorkflowNodeDetailResource().getExperimentResource());
                } else {
View Full Code Here

                WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
                TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) value);
                List<ErrorDetailResource> errorDetailList = taskDetail.getErrorDetailList();
                return ThriftDataModelConversion.getErrorDetailList(errorDetailList);
            } else if (fieldName.equals(Constants.FieldConstants.ErrorDetailsConstants.JOB_ID)) {
                CompositeIdentifier cid = (CompositeIdentifier) value;
                ExperimentResource experiment = (ExperimentResource) gatewayResource.create(ResourceType.EXPERIMENT);
                WorkflowNodeDetailResource workflowNode = (WorkflowNodeDetailResource) experiment.create(ResourceType.WORKFLOW_NODE_DETAIL);
                TaskDetailResource taskDetail = workflowNode.getTaskDetail((String) cid.getTopLevelIdentifier());
                JobDetailResource jobDetail = taskDetail.getJobDetail((String) cid.getSecondLevelIdentifier());
                List<ErrorDetailResource> errorDetails = jobDetail.getErrorDetails();
                return ThriftDataModelConversion.getErrorDetailList(errorDetails);
            } else {
                logger.error("Unsupported field name to retrieve job details list...");
            }
View Full Code Here

      logger.debug("Publishing Task Status "+state.toString());
      monitorPublisher.publish(new TaskStatusChangeRequest(jobStatus.getIdentity(),state));
    }

    public  void updateJobStatus(String taskId, String jobID, JobState state) throws Exception {
        CompositeIdentifier ids = new CompositeIdentifier(taskId, jobID);
        JobDetails details = (JobDetails)airavataRegistry.get(RegistryModelType.JOB_DETAIL, ids);
        if(details == null) {
            details = new JobDetails();
        }
        org.apache.airavata.model.workspace.experiment.JobStatus status = new org.apache.airavata.model.workspace.experiment.JobStatus();
View Full Code Here

    try {
      Registry registry = jobExecutionContext.getRegistry();
      JobStatus status = new JobStatus();
      status.setJobState(state);
          details.setJobStatus(status);
      registry.add(ChildDataType.JOB_DETAIL,details, new CompositeIdentifier(jobExecutionContext.getTaskData().getTaskID(), details.getJobID()));
    } catch (Exception e) {
      throw new GFacException("Error persisting job status" + e.getLocalizedMessage(),e);
    }
  }
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.cpi.CompositeIdentifier

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.