Package org.apache.airavata.commons.gfac.type

Examples of org.apache.airavata.commons.gfac.type.ApplicationDescription


                    // and this handler is not able to find std* files?
                    try {
                     stdout = ftp.readRemoteFile(stdoutURI, gssCred, localStdOutFile);
                     stderr = ftp.readRemoteFile(stderrURI, gssCred, localStdErrFile);
                     //TODO: do we also need to set them as output parameters for another job
                     ApplicationDescription application = jobExecutionContext.getApplicationContext().getApplicationDeploymentDescription();
                     ApplicationDeploymentDescriptionType appDesc = application.getType();
                     appDesc.setStandardOutput(stdout);
                     appDesc.setStandardError(stderr);
                     jobExecutionContext.getApplicationContext().setApplicationDeploymentDescription(application);
                    }
                    catch(ToolsException e) {
View Full Code Here


        log.info("Saving service description ...");
        // Saving service descriptor
        airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);

        // Deployment descriptor creation
        ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
                .getType();
        applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("EchoApplication");
        applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
        applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
View Full Code Here

        }

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue(serviceName);
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("uot111");
View Full Code Here

        }

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue(serviceName);
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("uot111");
View Full Code Here

        }

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue(serviceName);
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("TG-MCB070039N");
View Full Code Here

        }

        /*
           Application descriptor creation and saving
        */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue(serviceName);
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("TG-MCB070039N");
View Full Code Here

            airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }

        ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
                .getType();
        applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("EchoApplication");
        applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
        applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
View Full Code Here

            airavataAPI.getApplicationManager().saveServiceDescription(serviceDescription);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }

        ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
                .getType();
        applicationDeploymentDescriptionType.addNewApplicationName().setStringValue("SSHEchoApplication");
        applicationDeploymentDescriptionType.setExecutableLocation("/bin/echo");
        applicationDeploymentDescriptionType.setScratchWorkingDirectory("/tmp");
View Full Code Here

        }

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue("EchoLocal");
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("sds128");
View Full Code Here

        }

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription appDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType app = (HpcApplicationDeploymentType) appDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName name = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        name.setStringValue("EchoLocal");
        app.setApplicationName(name);
        ProjectAccountType projectAccountType = app.addNewProjectAccount();
        projectAccountType.setProjectAccountNumber("sds128");

        QueueType queueType = app.addNewQueue();
        queueType.setQueueName("normal");

        app.setCpuCount(1);
        app.setJobType(JobTypeType.SERIAL);
        app.setNodeCount(1);
        app.setProcessorsPerNode(1);
        app.setMaxWallTime(10);
        /*
           * Use bat file if it is compiled on Windows
           */
        app.setExecutableLocation("/bin/echo");

        /*
           * Default tmp location
           */
        String tempDir = "/oasis/scratch/trestles/ogce/temp_project/";


        app.setScratchWorkingDirectory(tempDir);
        app.setInstalledParentPath("/opt/torque/bin/");

        try {
            airavataAPI.getApplicationManager().saveApplicationDescription(serviceName, trestleshpcHostAddress, appDesc);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }

         /*
        * Service Description creation and saving
        */
        String wrfserviceName = "WRF";
        ServiceDescription wrfServ = new ServiceDescription();
        wrfServ.getType().setName(wrfserviceName);

        List<InputParameterType> wrfinputList = new ArrayList<InputParameterType>();
        List<OutputParameterType> wrfoutputList = new ArrayList<OutputParameterType>();


        InputParameterType wrfinput1 = InputParameterType.Factory.newInstance();
        wrfinput1.setParameterName("WRF_Namelist");
        ParameterType wrfparameterType1 = wrfinput1.addNewParameterType();
        wrfparameterType1.setType(DataType.URI);
        wrfparameterType1.setName("URI");

        InputParameterType wrfinput2 = InputParameterType.Factory.newInstance();
        wrfinput2.setParameterName("WRF_Input_File");
        ParameterType wrfparameterType2 = wrfinput2.addNewParameterType();
        wrfparameterType2.setType(DataType.URI);
        wrfparameterType2.setName("URI");

        InputParameterType wrfinput3 = InputParameterType.Factory.newInstance();
        wrfinput3.setParameterName("WRF_Boundary_File");
        ParameterType wrfparameterType3 = wrfinput3.addNewParameterType();
        wrfparameterType3.setType(DataType.URI);
        wrfparameterType3.setName("URI");

        OutputParameterType wrfOutput1 = OutputParameterType.Factory.newInstance();
        wrfOutput1.setParameterName("WRF_Output");
        ParameterType wrfoutparameterType1 = wrfOutput1.addNewParameterType();
        wrfoutparameterType1.setType(DataType.URI);
        wrfoutparameterType1.setName("URI");

        OutputParameterType wrfOutput2 = OutputParameterType.Factory.newInstance();
        wrfOutput2.setParameterName("WRF_Execution_Log");
        ParameterType wrfoutparameterType2 = wrfOutput2.addNewParameterType();
        wrfoutparameterType2.setType(DataType.URI);
        wrfoutparameterType2.setName("URI");

        wrfinputList.add(wrfinput1);
        wrfinputList.add(wrfinput2);
        wrfinputList.add(wrfinput3);
        wrfoutputList.add(wrfOutput1);
        wrfoutputList.add(wrfOutput2);

        InputParameterType[] wrfinputParamList = wrfinputList.toArray(new InputParameterType[wrfinputList.size()]);
        OutputParameterType[] wrfoutputParamList = wrfoutputList.toArray(new OutputParameterType[wrfoutputList.size()]);

        wrfServ.getType().setInputParametersArray(wrfinputParamList);
        wrfServ.getType().setOutputParametersArray(wrfoutputParamList);
        try {
            airavataAPI.getApplicationManager().saveServiceDescription(wrfServ);
        } catch (AiravataAPIInvocationException e) {
            e.printStackTrace()//To change body of catch statement use File | Settings | File Templates.
        }

        /*
            Application descriptor creation and saving
         */
        ApplicationDescription wrfAppDesc = new ApplicationDescription(HpcApplicationDeploymentType.type);
        HpcApplicationDeploymentType wrfApp = (HpcApplicationDeploymentType) wrfAppDesc.getType();
        ApplicationDeploymentDescriptionType.ApplicationName wrfName = ApplicationDeploymentDescriptionType.ApplicationName.Factory.newInstance();
        wrfName.setStringValue("WRF");
        wrfApp.setApplicationName(wrfName);
        ProjectAccountType wrfprojectAccountType = wrfApp.addNewProjectAccount();
        wrfprojectAccountType.setProjectAccountNumber("sds128");
View Full Code Here

TOP

Related Classes of org.apache.airavata.commons.gfac.type.ApplicationDescription

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.