Package org.apache.airavata.registry.cpi

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


     */
    public List<TaskDetails> createTasks(String experimentId) throws OrchestratorException {
        Experiment experiment = null;
        List<TaskDetails> tasks = new ArrayList<TaskDetails>();
        try {
            Registry newRegistry = orchestratorContext.getNewRegistry();
            experiment = (Experiment) newRegistry.get(RegistryModelType.EXPERIMENT, experimentId);


            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


  }

  public static void saveJobStatus(JobExecutionContext jobExecutionContext,
      JobDetails details, JobState state) throws GFacException {
    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

  }

  public static void updateJobStatus(JobExecutionContext jobExecutionContext,
      JobDetails details, JobState state) throws GFacException {
    try {
      Registry registry = jobExecutionContext.getRegistry();
      JobStatus status = new JobStatus();
      status.setJobState(state);
      status.setTimeOfStateChange(Calendar.getInstance()
          .getTimeInMillis());
      details.setJobStatus(status);
      registry.update(
          org.apache.airavata.registry.cpi.RegistryModelType.JOB_DETAIL,
          details, details.getJobID());
    } catch (Exception e) {
      throw new GFacException("Error persisting job status"
          + e.getLocalizedMessage(), e);
View Full Code Here

  public static void saveErrorDetails(
      JobExecutionContext jobExecutionContext, String errorMessage,
      CorrectiveAction action, ErrorCategory errorCatogory)
      throws GFacException {
    try {
      Registry registry = RegistryFactory.getDefaultRegistry();
      ErrorDetails details = new ErrorDetails();
      details.setActualErrorMessage(errorMessage);
      details.setCorrectiveAction(action);
      details.setActionableGroup(ActionableGroup.GATEWAYS_ADMINS);
      details.setCreationTime(Calendar.getInstance().getTimeInMillis());
      details.setErrorCategory(errorCatogory);
      registry.add(ChildDataType.ERROR_DETAIL, details,
          jobExecutionContext.getTaskData().getTaskID());
    } catch (Exception e) {
      throw new GFacException("Error persisting job status"
          + e.getLocalizedMessage(), e);
    }
View Full Code Here

        userConfigurationData.setAiravataAutoSchedule(false);
        userConfigurationData.setOverrideManualScheduledParams(false);
        userConfigurationData.setComputationalResourceScheduling(scheduling);
        simpleExperiment.setUserConfigurationData(userConfigurationData);

        Registry defaultRegistry = RegistryFactory.getDefaultRegistry();
        String experimentId = (String)defaultRegistry.add(ParentDataType.EXPERIMENT, simpleExperiment);

        simpleExperiment.setExperimentID(experimentId);
        tasks = orchestrator.createTasks(experimentId);

        Assert.assertTrue(orchestrator.validateExperiment(simpleExperiment, test, tasks.get(0)).isValidationState());
View Full Code Here

        userConfigurationData.setAiravataAutoSchedule(false);
        userConfigurationData.setOverrideManualScheduledParams(false);
        userConfigurationData.setComputationalResourceScheduling(scheduling);
        simpleExperiment.setUserConfigurationData(userConfigurationData);

        Registry defaultRegistry = RegistryFactory.getDefaultRegistry();
        String experimentId = (String)defaultRegistry.add(ParentDataType.EXPERIMENT, simpleExperiment);

        simpleExperiment.setExperimentID(experimentId);
        tasks = orchestrator.createTasks(experimentId);
          for(TaskDetails details:tasks) {
              orchestrator.launchExperiment(simpleExperiment,test, details);
View Full Code Here

        userConfigurationData.setOverrideManualScheduledParams(false);
        userConfigurationData.setComputationalResourceScheduling(scheduling);
        simpleExperiment.setUserConfigurationData(userConfigurationData);

        WorkflowNodeDetails test = ExperimentModelUtil.createWorkflowNode("test", null);
        Registry registry = RegistryFactory.getDefaultRegistry();
        experimentID = (String) registry.add(ParentDataType.EXPERIMENT, simpleExperiment);
        tasks = orchestrator.createTasks(experimentID);

        for (TaskDetails taskDetail: tasks)
        {
            orchestrator.launchExperiment(simpleExperiment,test, taskDetail);
View Full Code Here

     */
    public List<TaskDetails> createTasks(String experimentId) throws OrchestratorException {
        Experiment experiment = null;
        List<TaskDetails> tasks = new ArrayList<TaskDetails>();
        try {
            Registry newRegistry = orchestratorContext.getNewRegistry();
            experiment = (Experiment) newRegistry.get(RegistryModelType.EXPERIMENT, experimentId);


            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

            log.error("Error in persisting application job data for application job " + job.getJobId() + "!!!", e);
        }
    }
    public static void saveJobStatus(JobExecutionContext jobExecutionContext, JobDetails details, JobState state) throws GFacException {
    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

    }
  }

    public static void updateJobStatus(JobExecutionContext jobExecutionContext,JobDetails details, JobState state) throws GFacException {
    try {
            Registry registry = jobExecutionContext.getRegistry();
      JobStatus status = new JobStatus();
      status.setJobState(state);
      status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
          details.setJobStatus(status);
      registry.update(org.apache.airavata.registry.cpi.RegistryModelType.JOB_DETAIL, details, 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.Registry

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.