Examples of ExperimentStatus


Examples of eu.planets_project.pp.plato.bean.ExperimentStatus

    public void run(Object alt) {
        if (! (alt instanceof Alternative)) {
            return;
        }
        if (experimentStatus == null)  {
         experimentStatus = new ExperimentStatus();
        }
        experimentStatus.experimentSetup(Arrays.asList((Alternative)alt), selectedPlan.getSampleRecordsDefinition().getRecords());
    }
View Full Code Here

Examples of eu.planets_project.pp.plato.bean.ExperimentStatus

     * Runs experiments of all considered alternatives.
     *
     */
    public void runAllExperiments(){
        if (experimentStatus == null)  {
            experimentStatus = new ExperimentStatus();
           }
        experimentStatus.experimentSetup(consideredAlternatives, selectedPlan.getSampleRecordsDefinition().getRecords());
    }
View Full Code Here

Examples of eu.planets_project.pp.plato.bean.ExperimentStatus

    /**
     * runs all experiments scheduled in experimentStatus
     */
    public void startExperiments() {
        if (experimentStatus == null)  {
            experimentStatus = new ExperimentStatus();
           }
        Alternative alt = experimentStatus.getNextAlternative();
        while ((alt != null)&&(! experimentStatus.isCanceled())) {
            runSingle(alt);
            alt = experimentStatus.getNextAlternative();
View Full Code Here

Examples of eu.planets_project.pp.plato.bean.ExperimentStatus

    public void runAllExperiments() {
       
        leaves.clear();
       
        if (experimentStatus == null) {
            experimentStatus = new ExperimentStatus();
        }
        experimentStatus.experimentSetup(selectedPlan
                .getAlternativesDefinition().getAlternatives(), selectedPlan
                .getSampleRecordsDefinition().getRecords());
    }
View Full Code Here

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

    //monitoring the job
    protected void monitorJob(final String expId) {
        Thread monitor = (new Thread() {
            public void run() {
              long previousUpdateTime=-1;
                ExperimentStatus experimentStatus = null;
                do {
                    try {
                      experimentStatus = client.getExperimentStatus(expId);
            if (previousUpdateTime!=experimentStatus.getTimeOfStateChange()) {
              previousUpdateTime=experimentStatus.getTimeOfStateChange();
              log.info(expId
                  + " : " + experimentStatus.getExperimentState().toString()
                  + " ["+new Date(previousUpdateTime).toString()+"]");
             
            }
                        Thread.sleep(2000);
                    } catch (Exception e) {
                        log.error("Thread interrupted", e);
                    }
                    Assert.assertFalse(experimentStatus.getExperimentState().equals(ExperimentState.FAILED));
                }while(!experimentStatus.getExperimentState().equals(ExperimentState.COMPLETED));
            }
        });
        monitor.start();
        try {
            monitor.join();
View Full Code Here

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

          if (experiment == null) {
            log.error("Error retrieving the Experiment by the given experimentID: "
                + experimentId);
            return false;
          }
          ExperimentStatus status = new ExperimentStatus();
          status.setExperimentState(ExperimentState.LAUNCHED);
          status.setTimeOfStateChange(Calendar.getInstance()
              .getTimeInMillis());
          experiment.setExperimentStatus(status);
          registry.update(RegistryModelType.EXPERIMENT, experiment,
              experimentId);
          // launching the experiment
          orchestrator.launchExperiment(experiment,
              workflowNodeDetail, taskID,null);
        }
      }

    } catch (Exception e) {
      // Here we really do not have to do much because only potential
      // failure can happen
      // is in gfac, if there are errors in gfac, it will handle the
      // experiment/task/job statuses
      // We might get failures in registry access before submitting the
      // jobs to gfac, in that case we
      // leave the status of these as created.
      ExperimentStatus status = new ExperimentStatus();
      status.setExperimentState(ExperimentState.FAILED);
      status.setTimeOfStateChange(Calendar.getInstance()
          .getTimeInMillis());
      experiment.setExperimentStatus(status);
      try {
        registry.update(RegistryModelType.EXPERIMENT, experiment,
            experimentId);
View Full Code Here

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

        try {
            registry = RegistryFactory.getDefaultRegistry();
            if (!registry.isExist(RegistryModelType.EXPERIMENT, airavataExperimentId)){
                throw new ExperimentNotFoundException("Requested experiment id " + airavataExperimentId + " does not exist in the system..");
            }
            ExperimentStatus experimentStatus = getExperimentStatus(airavataExperimentId);
            if (experimentStatus != null){
                ExperimentState experimentState = experimentStatus.getExperimentState();
                switch (experimentState){
                    case CREATED:
                        registry.update(RegistryModelType.EXPERIMENT, experiment, airavataExperimentId);
                        break;
                    case VALIDATED:
View Full Code Here

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

        try {
            registry = RegistryFactory.getDefaultRegistry();
            if (!registry.isExist(RegistryModelType.EXPERIMENT, airavataExperimentId)){
                throw new ExperimentNotFoundException("Requested experiment id " + airavataExperimentId + " does not exist in the system..");
            }
            ExperimentStatus experimentStatus = getExperimentStatus(airavataExperimentId);
            if (experimentStatus != null){
                ExperimentState experimentState = experimentStatus.getExperimentState();
                switch (experimentState){
                    case CREATED:
                        registry.add(ChildDataType.EXPERIMENT_CONFIGURATION_DATA, userConfiguration, airavataExperimentId);
                        break;
                    case VALIDATED:
View Full Code Here

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

        try {
            registry = RegistryFactory.getDefaultRegistry();
            if (!registry.isExist(RegistryModelType.EXPERIMENT, airavataExperimentId)){
                throw new ExperimentNotFoundException("Requested experiment id " + airavataExperimentId + " does not exist in the system..");
            }
            ExperimentStatus experimentStatus = getExperimentStatus(airavataExperimentId);
            if (experimentStatus != null){
                ExperimentState experimentState = experimentStatus.getExperimentState();
                switch (experimentState){
                    case CREATED:
                        registry.add(ChildDataType.COMPUTATIONAL_RESOURCE_SCHEDULING, resourceScheduling, airavataExperimentId);
                        break;
                    case VALIDATED:
View Full Code Here

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

                    experiment = (Experiment) registry.get(RegistryModelType.EXPERIMENT, experimentId);
                    if (experiment == null) {
                        logger.error("Error retrieving the Experiment by the given experimentID: " + experimentId);
                        return false;
                    }
                    ExperimentStatus status = new ExperimentStatus();
                    status.setExperimentState(ExperimentState.LAUNCHED);
                    status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
                    experiment.setExperimentStatus(status);
                    registry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
                    registry.update(RegistryModelType.TASK_DETAIL, taskData, taskData.getTaskID());
                    //launching the experiment
                    orchestratorClient.launchTask(taskData.getTaskID(),airavataCredStoreToken);
                }
            }

        } catch (Exception e) {
            // Here we really do not have to do much because only potential failure can happen
            // is in gfac, if there are errors in gfac, it will handle the experiment/task/job statuses
            // We might get failures in registry access before submitting the jobs to gfac, in that case we
            // leave the status of these as created.
            ExperimentStatus status = new ExperimentStatus();
            status.setExperimentState(ExperimentState.FAILED);
            status.setTimeOfStateChange(Calendar.getInstance().getTimeInMillis());
            experiment.setExperimentStatus(status);
            try {
                registry.update(RegistryModelType.EXPERIMENT_STATUS, status, experimentId);
            } catch (RegistryException e1) {
                throw new TException(e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.