Package org.apache.airavata.model.workspace.experiment

Examples of org.apache.airavata.model.workspace.experiment.TaskDetails


        jobExecutionContext.setOutMessageContext(outMessage);

        jobExecutionContext.setExperimentID("test123");
        jobExecutionContext.setExperiment(new Experiment("test123","project1","admin","testExp"));
        jobExecutionContext.setTaskData(new TaskDetails(jobExecutionContext.getExperimentID()));
        jobExecutionContext.setRegistry(new LoggingRegistryImpl());
        jobExecutionContext.setWorkflowNodeDetails(new WorkflowNodeDetails(jobExecutionContext.getExperimentID(),"none"));


    }
View Full Code Here


        MessageContext outMessage = new MessageContext();
        ActualParameter echo_out = new ActualParameter();
//    ((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
        outMessage.addParameter("echo_output", echo_out);
        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
        jobExecutionContext.setTaskData(new TaskDetails("11323"));
        jobExecutionContext.setOutMessageContext(outMessage);

    }
View Full Code Here

        MessageContext outMessage = new MessageContext();
        ActualParameter echo_out = new ActualParameter();
//    ((StringParameterType)echo_input.getType()).setValue("echo_output=hello");
        outMessage.addParameter("echo_output", echo_out);
        jobExecutionContext.setRegistry(RegistryFactory.getLoggingRegistry());
        jobExecutionContext.setTaskData(new TaskDetails("11323"));
        jobExecutionContext.setOutMessageContext(outMessage);

    }
View Full Code Here

                if (applicationDeploymentType.getQueue().getQueueName() != null) {
                    jobDescriptor.setQueueName(applicationDeploymentType.getQueue().getQueueName());
                }
            }
            jobDescriptor.setOwner(((PBSCluster) cluster).getServerInfo().getUserName());
            TaskDetails taskData = jobExecutionContext.getTaskData();
            if (taskData != null && taskData.isSetTaskScheduling()) {
                ComputationalResourceScheduling computionnalResource = taskData.getTaskScheduling();
                if (computionnalResource.getNodeCount() > 0) {
                    jobDescriptor.setNodes(computionnalResource.getNodeCount());
                }
                if (computionnalResource.getComputationalProjectAccount() != null) {
                    jobDescriptor.setAcountString(computionnalResource.getComputationalProjectAccount());
View Full Code Here

                }
            }
        }
        // Using the workflowContext Header values if user provided them in the request and overwrite the default values in DD
        //todo finish the scheduling based on workflow execution context
        TaskDetails taskData = context.getTaskData();
        if(taskData != null && taskData.isSetTaskScheduling()){
           ComputationalResourceScheduling computionnalResource = taskData.getTaskScheduling();
                try {
                    int cpuCount = computionnalResource.getTotalCPUCount();
                    if(cpuCount>0){
                        app.setCpuCount(cpuCount);
                    }
View Full Code Here

    HpcApplicationDeploymentType appDepType = (HpcApplicationDeploymentType) context
        .getApplicationContext().getApplicationDeploymentDescription()
        .getType();
   
    createMemory(value, appDepType);
    TaskDetails taskData = context.getTaskData();
      if(taskData != null && taskData.isSetTaskScheduling()){
        ComputationalResourceScheduling computionResource= taskData.getTaskScheduling();
                try {
                    int cpuCount = computionResource.getTotalCPUCount();
                    if(cpuCount>0){
//                      appDepType.setCpuCount(cpuCount);
                    NumberOfProcessesType num = NumberOfProcessesType.Factory.newInstance();
View Full Code Here

    return buff.toString();
  }
 
  private String getDownloadLocation() {
    TaskDetails taskData = jobContext.getTaskData();
    if (taskData != null && taskData.getAdvancedOutputDataHandling() != null) {
      String outputDataDirectory = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
      return outputDataDirectory;
    }
    return null;
  }
View Full Code Here

                    if (outputArray == null || outputArray.isEmpty()) {
                        throw new GFacHandlerException("Empty Output returned from the Application, Double check the application" +
                                "and ApplicationDescriptor output Parameter Names");
                    }
                    // If users has given an output Data path to download the output files this will download the file on machine where GFac is installed
                    TaskDetails taskData =  jobExecutionContext.getTaskData();
                    if(taskData != null && taskData.getAdvancedOutputDataHandling() != null){
                      String outputDataDirectory = taskData.getAdvancedOutputDataHandling().getOutputDataDir();
                            if(outputDataDirectory != null && !"".equals(outputDataDirectory)){
                                stageOutputFiles(jobExecutionContext,outputDataDirectory);
                            }
                    }
                } catch (ToolsException e) {
View Full Code Here


            WorkflowNodeDetails iDontNeedaNode = ExperimentModelUtil.createWorkflowNode("IDontNeedaNode", null);
            String nodeID = (String) newRegistry.add(ChildDataType.WORKFLOW_NODE_DETAIL, iDontNeedaNode, experimentId);

            TaskDetails taskDetails = ExperimentModelUtil.cloneTaskFromExperiment(experiment);
            taskDetails.setTaskID((String) newRegistry.add(ChildDataType.TASK_DETAIL, taskDetails, nodeID));
            tasks.add(taskDetails);
        } catch (Exception e) {
            throw new OrchestratorException("Error during creating a task");
        }
        return tasks;
View Full Code Here

      logger.debug("Publishing Experiment Status "+state.toString());
      monitorPublisher.publish(new WorkflowNodeStatusChangeRequest(taskStatus.getIdentity(),state));
    }
   
    public  void updateTaskStatus(String taskId, TaskState state) throws Exception {
      TaskDetails details = (TaskDetails)airavataRegistry.get(RegistryModelType.TASK_DETAIL, taskId);
        if(details == null) {
            details = new TaskDetails();
            details.setTaskID(taskId);
        }
        org.apache.airavata.model.workspace.experiment.TaskStatus status = new org.apache.airavata.model.workspace.experiment.TaskStatus();
        status.setExecutionState(state);
        status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
        details.setTaskStatus(status);
        airavataRegistry.update(RegistryModelType.TASK_DETAIL, details, taskId);
    }
View Full Code Here

TOP

Related Classes of org.apache.airavata.model.workspace.experiment.TaskDetails

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.