Examples of Experiment


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

            exOut.add(output);

            Project project = ProjectModelUtil.createProject("default", "admin", "test project");
            String projectId = client.createProject(project);

            Experiment simpleExperiment =
                    ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", "SimpleEcho3", "SimpleEcho3", exInputs);
            simpleExperiment.setExperimentOutputs(exOut);

            ComputationalResourceScheduling scheduling =
                    ExperimentModelUtil.createComputationResourceScheduling("stampede.tacc.xsede.org", 1, 1, 1, "normal", 0, 0, 1, "TG-STA110014S");
            UserConfigurationData userConfigurationData = new UserConfigurationData();
            userConfigurationData.setAiravataAutoSchedule(false);
            userConfigurationData.setOverrideManualScheduledParams(false);
            userConfigurationData.setComputationalResourceScheduling(scheduling);
            simpleExperiment.setUserConfigurationData(userConfigurationData);
            return client.createExperiment(simpleExperiment);
        } catch (AiravataSystemException e) {
            logger.error("Error occured while creating the experiment...", e.getMessage());
            throw new AiravataSystemException(e);
        } catch (InvalidRequestException e) {
View Full Code Here

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

            exOut.add(output);

            Project project = ProjectModelUtil.createProject("default", "admin", "test project");
            String projectId = client.createProject(project);

            Experiment simpleExperiment =
                    ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", "SimpleEcho4", "SimpleEcho4", exInputs);
            simpleExperiment.setExperimentOutputs(exOut);

            ComputationalResourceScheduling scheduling =
                    ExperimentModelUtil.createComputationResourceScheduling("lonestar.tacc.utexas.edu", 1, 1, 1, "normal", 0, 0, 1, "TG-STA110014S");
            scheduling.setResourceHostId("lonestar-host");
            UserConfigurationData userConfigurationData = new UserConfigurationData();
            userConfigurationData.setAiravataAutoSchedule(false);
            userConfigurationData.setOverrideManualScheduledParams(false);
            userConfigurationData.setComputationalResourceScheduling(scheduling);
            simpleExperiment.setUserConfigurationData(userConfigurationData);
            return client.createExperiment(simpleExperiment);
        } catch (AiravataSystemException e) {
            logger.error("Error occured while creating the experiment...", e.getMessage());
            throw new AiravataSystemException(e);
        } catch (InvalidRequestException e) {
View Full Code Here

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

        exOut.add(output);

        Project project = ProjectModelUtil.createProject("project1", "admin", "test project");
        String projectId = getClient().createProject(project);

        Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", "SimpleEcho2", "SimpleEcho2", exInputs);
        simpleExperiment.setExperimentOutputs(exOut);

        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("trestles.sdsc.edu", 1, 1, 1, "normal", 0, 0, 1, "sds128");
        scheduling.setResourceHostId("gsissh-trestles");
        UserConfigurationData userConfigurationData = new UserConfigurationData();
        userConfigurationData.setAiravataAutoSchedule(false);
        userConfigurationData.setOverrideManualScheduledParams(false);
        userConfigurationData.setComputationalResourceScheduling(scheduling);
        simpleExperiment.setUserConfigurationData(userConfigurationData);
        final String expId = createExperiment(simpleExperiment);
        System.out.println("Experiment Id returned : " + expId);
        log.info("Experiment Id returned : " + expId );
        launchExperiment(expId);
        System.out.println("Launched successfully");
View Full Code Here

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

        exOut.add(output);

        Project project = ProjectModelUtil.createProject("project1", "admin", "test project");
        String projectId = getClient().createProject(project);

        Experiment simpleExperiment = ExperimentModelUtil.createSimpleExperiment(projectId, "admin", "echoExperiment", "SimpleEcho3", "SimpleEcho3", exInputs);
        simpleExperiment.setExperimentOutputs(exOut);

        ComputationalResourceScheduling scheduling = ExperimentModelUtil.createComputationResourceScheduling("stampede.tacc.xsede.org", 1, 1, 1, "normal", 0, 0, 1, "TG-STA110014S");
        scheduling.setResourceHostId("stampede-host");
        UserConfigurationData userConfigurationData = new UserConfigurationData();
        userConfigurationData.setAiravataAutoSchedule(false);
        userConfigurationData.setOverrideManualScheduledParams(false);
        userConfigurationData.setComputationalResourceScheduling(scheduling);
        simpleExperiment.setUserConfigurationData(userConfigurationData);
        final String expId = createExperiment(simpleExperiment);
        System.out.println("Experiment Id returned : " + expId);
        log.info("Experiment Id returned : " + expId );
        launchExperiment(expId);
        System.out.println("Launched successfully");
View Full Code Here

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

     * @param experimentId
     * @return
     * @throws OrchestratorException
     */
    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);

View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.model.Experiment

            EntityManager em = ResourceUtils.getEntityManager();
            em.getTransaction().begin();
          QueryGenerator generator = new QueryGenerator(EXPERIMENT);
          generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
          Query q = generator.selectQuery(em);
            Experiment experiment = (Experiment) q.getSingleResult();
            ExperimentResource experimentResource = (ExperimentResource)
                    Utils.getResource(ResourceType.EXPERIMENT, experiment);
            em.getTransaction().commit();
            em.close();
            return experimentResource;
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.model.Experiment

          generator.setParameter(ExperimentConstants.PROJECT_NAME, name);
          Query q = generator.selectQuery(em);
            List<?> results = q.getResultList();
            if (results.size() != 0) {
                for (Object result : results) {
                    Experiment experiment = (Experiment) result;
                    ExperimentResource experimentResource = (ExperimentResource)
                            Utils.getResource(ResourceType.EXPERIMENT, experiment);
                    resourceList.add(experimentResource);
                }
            }
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.model.Experiment

        EntityManager em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        QueryGenerator queryGenerator = new QueryGenerator(EXPERIMENT);
        queryGenerator.setParameter(ExperimentConstants.EXPERIMENT_ID, keys[0]);
        Query q = queryGenerator.selectQuery(em);
        Experiment experiment = (Experiment)q.getSingleResult();
        ExperimentResource experimentResource =
                (ExperimentResource)Utils.getResource(ResourceType.EXPERIMENT, experiment);
        em.getTransaction().commit();
        em.close();
        list.add(experimentResource);
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.model.Experiment

    /**
     * save experiment
     */
    public void save() {
        EntityManager em = ResourceUtils.getEntityManager();
        Experiment existingExp = em.find(Experiment.class, expID);
        em.close();

        em = ResourceUtils.getEntityManager();
        em.getTransaction().begin();
        Experiment experiment = new Experiment();
        Project projectmodel = em.find(Project.class, project.getName());
        experiment.setProject(projectmodel);
        Users user = em.find(Users.class, getWorker().getUser());
        Gateway gateway = em.find(Gateway.class, getGateway().getGatewayName());
        experiment.setProject(projectmodel);
        experiment.setExperiment_ID(getExpID());
        experiment.setUser(user);
        experiment.setGateway(gateway);
        experiment.setSubmitted_date(submittedDate);
        if(existingExp != null){
            existingExp.setGateway(gateway);
            existingExp.setProject(projectmodel);
            existingExp.setUser(user);
            existingExp.setSubmitted_date(submittedDate);
View Full Code Here

Examples of org.apache.airavata.persistance.registry.jpa.model.Experiment

          QueryGenerator generator = new QueryGenerator(EXPERIMENT);
//          generator.setParameter(ExperimentConstants.PROJECT_NAME, name);
//          generator.setParameter(ExperimentConstants.USERNAME, getWorker().getUser());
          generator.setParameter(ExperimentConstants.EXPERIMENT_ID, name);
          Query q = generator.selectQuery(em);
            Experiment experiment = (Experiment) q.getSingleResult();
            ExperimentResource experimentResource = (ExperimentResource)
                    Utils.getResource(ResourceType.EXPERIMENT, experiment);
            em.getTransaction().commit();
            em.close();
            return experimentResource;
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.