Package com.cloudera.kitten

Examples of com.cloudera.kitten.ContainerLaunchParameters


    ApplicationSubmissionContext appContext = clientApp.getApplicationSubmissionContext();
    this.applicationId = appContext.getApplicationId();
    appContext.setApplicationName(parameters.getApplicationName());
   
    // Setup the container for the application master.
    ContainerLaunchParameters appMasterParams = parameters.getApplicationMasterParameters(applicationId);
    ContainerLaunchContext clc = clcFactory.create(appMasterParams);
    appContext.setResource(clcFactory.createResource(appMasterParams));
    appContext.setAMContainerSpec(clc);
    appContext.setQueue(parameters.getQueue());
    appContext.setPriority(clcFactory.createPriority(appMasterParams.getPriority()));
    submitApplication(appContext);
   
    // Make sure we stop the application in the case that it isn't done already.
    Runtime.getRuntime().addShutdownHook(new Thread() {
      @Override
View Full Code Here


        conf);
    assertEquals("Distributed Shell", params.getApplicationName());
    assertEquals(86400L, params.getClientTimeoutMillis());
    assertEquals("default", params.getQueue());
   
    ContainerLaunchParameters clp = params.getApplicationMasterParameters(null);
    assertEquals(1, clp.getPriority());
    // clusterMax = 90 < 100
    assertEquals(clusterMax, clp.getContainerResource(clusterMax));
    Map<String, String> expEnv = ImmutableMap.of(
        "zs", "10", "a", "b", "fiz", "faz", "foo", "foo", "biz", "baz");
    Map<String, String> actEnv = clp.getEnvironment();
    for (Map.Entry<String, String> e : expEnv.entrySet()) {
      assertEquals(e.getValue(), actEnv.get(e.getKey()));
    }
  }
View Full Code Here

TOP

Related Classes of com.cloudera.kitten.ContainerLaunchParameters

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.