Package org.springframework.yarn.boot.app

Examples of org.springframework.yarn.boot.app.YarnContainerClusterApplication


    @Override
    protected void runApplication(OptionSet options) throws Exception {
      String appId = options.valueOf(applicationIdOption);
      String versionId = options.valueOf(clusterIdOption);
      YarnContainerClusterApplication app = new YarnContainerClusterApplication();
      Properties appProperties = new Properties();
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.operation", "CLUSTERDESTROY");
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.applicationId",
          appId);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.clusterId",
          versionId);
      app.appProperties(appProperties);
      String info = app.run(new String[0]);
      handleOutput(info);
    }
View Full Code Here


      String appId = options.valueOf(applicationIdOption);
      String clusterId = options.valueOf(clusterIdOption);
      String projectionAny = options.valueOf(projectionDataAnyOption);
      List<String> projectionHosts = options.valuesOf(projectionDataHostsOption);
      List<String> projectionRacks = options.valuesOf(projectionDataRacksOption);
      YarnContainerClusterApplication app = new YarnContainerClusterApplication();
      Properties appProperties = new Properties();
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.operation", "CLUSTERMODIFY");
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.applicationId",
          appId);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.clusterId",
          clusterId);

      if (StringUtils.hasText(projectionAny)) {
        appProperties
            .setProperty("spring.yarn.internal.ContainerClusterApplication.projectionDataAny", projectionAny);
      }

      for (Entry<String, Integer> entry : getMapFromString(projectionHosts).entrySet()) {
        appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.projectionDataHosts."
            + entry.getKey(), entry.getValue().toString());
      }

      for (Entry<String, Integer> entry : getMapFromString(projectionRacks).entrySet()) {
        appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.projectionDataRacks."
            + entry.getKey(), entry.getValue().toString());
      }

      app.appProperties(appProperties);
      String info = app.run(new String[0]);
      handleOutput(info);
    }
View Full Code Here

    @Override
    protected void runApplication(OptionSet options) throws Exception {
      String appId = options.valueOf(applicationIdOption);
      String clusterId = options.valueOf(clusterIdOption);
      YarnContainerClusterApplication app = new YarnContainerClusterApplication();
      Properties appProperties = new Properties();
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.operation", "CLUSTERINFO");
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.applicationId",
          appId);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.clusterId",
          clusterId);
      if (isFlagOn(options, verboseOption)) {
        appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.verbose", "true");
      }
      app.appProperties(appProperties);
      String info = app.run(new String[0]);
      handleOutput(info);
    }
View Full Code Here

    }

    @Override
    protected void runApplication(OptionSet options) throws Exception {
      String appId = options.valueOf(applicationIdOption);
      YarnContainerClusterApplication app = new YarnContainerClusterApplication();
      Properties appProperties = new Properties();
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.operation", "CLUSTERSINFO");
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.applicationId",
          appId);
      app.appProperties(appProperties);
      String info = app.run(new String[0]);
      handleOutput(info);
    }
View Full Code Here

      String projectionType = options.valueOf(projectionTypeOption);
      String projectionAny = options.valueOf(projectionDataAnyOption);
      List<String> projectionHosts = options.valuesOf(projectionDataHostsOption);
      List<String> projectionRacks = options.valuesOf(projectionDataRacksOption);

      YarnContainerClusterApplication app = new YarnContainerClusterApplication();
      Properties appProperties = new Properties();
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.operation", "CLUSTERCREATE");
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.applicationId",
          appId);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.clusterId",
          clusterId);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.clusterDef",
          clusterDef);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.projectionType",
          projectionType);

      if (StringUtils.hasText(projectionAny)) {
        appProperties
            .setProperty("spring.yarn.internal.ContainerClusterApplication.projectionDataAny", projectionAny);
      }

      for (Entry<String, Integer> entry : getMapFromString(projectionHosts).entrySet()) {
        appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.projectionDataHosts."
            + entry.getKey(), entry.getValue().toString());
      }

      for (Entry<String, Integer> entry : getMapFromString(projectionRacks).entrySet()) {
        appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.projectionDataRacks."
            + entry.getKey(), entry.getValue().toString());
      }

      Properties extraProperties = getExtraProperties(options);
      if (extraProperties != null) {
        for (String key : extraProperties.stringPropertyNames()) {
          appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.extraProperties."
              + key, extraProperties.getProperty(key));
        }
      }

      app.appProperties(appProperties);
      handleOutput(app.run());
    }
View Full Code Here

    @Override
    protected void runApplication(OptionSet options) throws Exception {
      String appId = options.valueOf(applicationIdOption);
      String clusterId = options.valueOf(clusterIdOption);
      Assert.state(StringUtils.hasText(appId) && StringUtils.hasText(clusterId), "Cluster Id and Application Id must be defined");
      YarnContainerClusterApplication app = new YarnContainerClusterApplication();
      Properties appProperties = new Properties();
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.operation", "CLUSTERSTOP");
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.applicationId",
          appId);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.clusterId",
          clusterId);
      app.appProperties(appProperties);
      String info = app.run(new String[0]);
      handleOutput(info);
    }
View Full Code Here

    @Override
    protected void runApplication(OptionSet options) throws Exception {
      String appId = options.valueOf(applicationIdOption);
      String clusterId = options.valueOf(clusterIdOption);
      Assert.state(StringUtils.hasText(appId) && StringUtils.hasText(clusterId), "Cluster Id and Application Id must be defined");
      YarnContainerClusterApplication app = new YarnContainerClusterApplication();
      Properties appProperties = new Properties();
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.operation", "CLUSTERSTART");
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.applicationId",
          appId);
      appProperties.setProperty("spring.yarn.internal.ContainerClusterApplication.clusterId",
          clusterId);
      app.appProperties(appProperties);
      String info = app.run(new String[0]);
      handleOutput(info);
    }
View Full Code Here

TOP

Related Classes of org.springframework.yarn.boot.app.YarnContainerClusterApplication

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.