Package org.apache.hadoop.yarn.client.api

Examples of org.apache.hadoop.yarn.client.api.YarnClient.createApplication()


  }
 
  static void configure(TezClientForTest client) throws YarnException, IOException {
    ApplicationId appId1 = ApplicationId.newInstance(0, 1);
    YarnClient yarnClient = mock(YarnClient.class, RETURNS_DEEP_STUBS);
    when(yarnClient.createApplication().getNewApplicationResponse().getApplicationId()).thenReturn(appId1);

    DAGClientAMProtocolBlockingPB sessionAmProxy = mock(DAGClientAMProtocolBlockingPB.class, RETURNS_DEEP_STUBS);

    client.sessionAmProxy = sessionAmProxy;
    client.mockTezYarnClient = new TezYarnClient(yarnClient);
View Full Code Here


    YarnClient yarnClient = YarnClient.createYarnClient();
    yarnClient.init(conf);
    yarnClient.start();
   
    // Create application via yarnClient
    YarnClientApplication app = yarnClient.createApplication();

    // Set up the container launch context for the application master
    ContainerLaunchContext amContainer =
        Records.newRecord(ContainerLaunchContext.class);
    amContainer.setCommands(
View Full Code Here

    System.out.println("\tJobManager memory = "+jmMemory);
    System.out.println("\tTaskManager memory = "+tmMemory);
    System.out.println("\tTaskManager cores = "+tmCores);

    // Create application via yarnClient
    YarnClientApplication app = yarnClient.createApplication();
    GetNewApplicationResponse appResponse = app.getNewApplicationResponse();
    Resource maxRes = appResponse.getMaximumResourceCapability();
    if(tmMemory > maxRes.getMemory() || tmCores > maxRes.getVirtualCores()) {
      LOG.fatal("The cluster does not have the requested resources for the TaskManagers available!\n"
          + "Maximum Memory: "+maxRes.getMemory() +", Maximum Cores: "+tmCores);
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.