Package org.springframework.yarn.client

Examples of org.springframework.yarn.client.YarnClient.submitApplication()


  private void doSubmitAndAssert() throws Exception {
    YarnClient client = (YarnClient) ctx.getBean("yarnClient");
    assertThat(client, notNullValue());

    ApplicationId applicationId = client.submitApplication();
    assertThat(applicationId, notNullValue());

    YarnApplicationState state = null;
    for (int i = 0; i<120; i++) {
      state = findState(client, applicationId);
View Full Code Here


        SpringYarnProperties syp = context.getBean(SpringYarnProperties.class);
        String applicationdir = SpringYarnBootUtils.resolveApplicationdir(syp);
        if (client instanceof ApplicationYarnClient) {
          return ((ApplicationYarnClient)client).submitApplication(new ApplicationDescriptor(applicationdir));
        } else {
          return client.submitApplication(false);
        }
      }

    }, args);
  }
View Full Code Here

      ConfigurableApplicationContext context = null;
      try {
        context = new ClassPathXmlApplicationContext("application-context.xml");
        System.out.println("Submitting kill-application example");
        YarnClient client = (YarnClient) context.getBean("yarnClient");
        ApplicationId applicationId = client.submitApplication();
        System.out.println("Submitted kill-application example");
        System.out.println("Waiting 30 seconds before aborting the application");
        Thread.sleep(30000);
        System.out.println("Asking resource manager to abort application with applicationid=" + applicationId);
        client.killApplication(applicationId);
View Full Code Here

    YarnClient client = ctx.getBean(YarnClient.class);
    if (install) {
      client.installApplication();
    }
    if (submit) {
      client.submitApplication(false);
    }
  }

}
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.