Examples of DeploymentDescriptionType


Examples of org.ogce.schemas.gfac.documents.DeploymentDescriptionType

    if (appName == null) {
      appName = appType.addNewApplicationName();
    }
    appName.setStringValue(appInfo.getApplicationName().trim());
    appName.setTargetNamespace(appInfo.getObjectNamespace());
    DeploymentDescriptionType deployment = appType.getDeploymentDescription();
    if (deployment == null) {
      deployment = appType.addNewDeploymentDescription();
    }
    deployment.setHostName(appInfo.getHostName().trim());
    deployment.setExecutable(appInfo.getExecutable());
    if (appInfo.getWorkDir() != null) {
      deployment.setWorkDir(appInfo.getWorkDir());
    }
    if (appInfo.getTmpDir() != null) {
      deployment.setTmpDir(appInfo.getTmpDir());
    }
    if (appInfo.getJobType() != null) {
      appType.setJobType(org.ogce.schemas.gfac.documents.JobTypeType.Enum.forString(appInfo.getJobType()));
    }
    if (appInfo.getLeadNameListFile() != null) {
      deployment.setLeadNameListFile(appInfo.getLeadNameListFile());
    }

    if (appInfo.getMaxWallTime() != null) {
      appType.setMaxWallTime(Integer.valueOf(appInfo.getMaxWallTime()));
    }
View Full Code Here

Examples of org.ogce.schemas.gfac.documents.DeploymentDescriptionType

    if (appName == null) {
      appName = appType.addNewApplicationName();
    }
    appName.setStringValue(appInfo.getApplicationName().trim());
    appName.setTargetNamespace(appInfo.getObjectNamespace());
    DeploymentDescriptionType deployment = appType.getDeploymentDescription();
    if (deployment == null) {
      deployment = appType.addNewDeploymentDescription();
    }
    deployment.setHostName(appInfo.getHostName().trim());
    deployment.setExecutable(appInfo.getExecutable());
    if (appInfo.getWorkDir() != null) {
      deployment.setWorkDir(appInfo.getWorkDir());
    }
    if (appInfo.getTmpDir() != null) {
      deployment.setTmpDir(appInfo.getTmpDir());
    }
    if (appInfo.getJobType() != null) {
      appType.setJobType(org.ogce.schemas.gfac.documents.JobTypeType.Enum.forString(appInfo.getJobType()));
    }
    if (appInfo.getLeadNameListFile() != null) {
      deployment.setLeadNameListFile(appInfo.getLeadNameListFile());
    }

    if (appInfo.getMaxWallTime() != null) {
      appType.setMaxWallTime(Integer.valueOf(appInfo.getMaxWallTime()));
    }
View Full Code Here

Examples of org.ogce.schemas.gfac.documents.DeploymentDescriptionType

        if(appDesc.getDeploymentDescription() == null)
        {
            throw new GFacSchemaException("Every application must have a deployment description");
        }

        DeploymentDescriptionType deployDesc = appDesc.getDeploymentDescription();

        if(deployDesc.getHostName() == null)
        {
            throw new GFacSchemaException("You must specify a host name in the application description document");
        }

        if(deployDesc.getExecutable() == null)
        {
            throw new GFacSchemaException("You must specify the path to the application/executable");
        }
    }
View Full Code Here

Examples of org.ogce.schemas.gfac.documents.DeploymentDescriptionType

    ApplicationName appName = appType.addNewApplicationName();

    appName.setStringValue(appInfo.getApplicationName().trim());
    appName.setTargetNamespace(appInfo.getObjectNamespace());
    DeploymentDescriptionType deployment = appType
        .getDeploymentDescription();
    if (deployment == null) {
      deployment = appType.addNewDeploymentDescription();
    }
    deployment.setHostName(appInfo.getHostName().trim());
    deployment.setExecutable(appInfo.getExecutable());
    if (appInfo.getWorkDir() != null) {
      deployment.setWorkDir(appInfo.getWorkDir());
    }
    if (appInfo.getTmpDir() != null) {
      deployment.setTmpDir(appInfo.getTmpDir());
    }
    if (appInfo.getJobType() != null) {
      appType.setJobType(Enum.forString(appInfo.getJobType()));
    }
    if (appInfo.getLeadNameListFile() != null) {
      deployment.setLeadNameListFile(appInfo.getLeadNameListFile());
    }

    if (appInfo.getMaxWallTime() != null) {
      appType.setMaxWallTime(Integer.valueOf(appInfo.getMaxWallTime()));
    }
View Full Code Here

Examples of org.ogce.schemas.gfac.documents.DeploymentDescriptionType

        // host desc
        String hostDesc = registryService.getHostDesc(hostName);
        HostDescriptionType hostDescType = HostDescriptionDocument.Factory.parse(hostDesc).getHostDescription();

        // application deployment
        DeploymentDescriptionType deploymentDesc = appDescType.getDeploymentDescription();
        String tmpDir = deploymentDesc.getTmpDir();
        if (tmpDir == null && hostDescType != null) {
          tmpDir = hostDescType.getHostConfiguration().getTmpDir();
        }

        if (tmpDir == null) {
          tmpDir = "/tmp";
        }

        String date = new Date().toString();
        date = date.replaceAll(" ", "_");
        date = date.replaceAll(":", "_");

        tmpDir = tmpDir + File.separator + appDescType.getApplicationName().getStringValue() + "_" + date + "_" + UUID.randomUUID();

        String workingDir = deploymentDesc.getWorkDir();
        if (workingDir == null || workingDir.trim().length() == 0) {
          workingDir = tmpDir;
        }

        String stdOut = tmpDir + File.separator + appDescType.getApplicationName().getStringValue() + ".stdout";
        String stderr = tmpDir + File.separator + appDescType.getApplicationName().getStringValue() + ".stderr";
        String executable = deploymentDesc.getExecutable();
        String host = deploymentDesc.getHostName();

        NameValuePairType[] env = deploymentDesc.getApplicationEnvArray();
        Map<String, String> envMap = new HashMap<String, String>();
        if (env != null) {
          for (int i = 0; i < env.length; i++) {
            envMap.put(env[i].getName(), env[i].getValue());
          }
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.