Package com.cloudera.kitten

Examples of com.cloudera.kitten.ContainerLaunchContextFactory


  @Override
  protected void startUp() {
    this.yarnClient = yarnClientFactory.connect();
    YarnClientApplication clientApp = getNewApplication();
    GetNewApplicationResponse newApp = clientApp.getNewApplicationResponse();
    ContainerLaunchContextFactory clcFactory = new ContainerLaunchContextFactory(newApp.getMaximumResourceCapability());
   
    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


      LOG.error("Exception thrown registering application master", e);
      stop();
      return;
    }

    ContainerLaunchContextFactory factory = new ContainerLaunchContextFactory(
        registration.getMaximumResourceCapability());
    for (ContainerLaunchParameters clp : parameters.getContainerLaunchParameters()) {
      ContainerTracker tracker = new ContainerTracker(clp);
      tracker.init(factory);
      trackers.add(tracker);
View Full Code Here

TOP

Related Classes of com.cloudera.kitten.ContainerLaunchContextFactory

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.