Examples of killApplication()


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

    Runtime.getRuntime().addShutdownHook(new Thread() {
    @Override
    public void run() {
      try {
        LOG.info("Killing the Stratosphere-YARN application.");
        yarnClient.killApplication(appId);
        LOG.info("Deleting files in "+paths[2]);
        FileSystem shutFS = FileSystem.get(conf);
        shutFS.delete(paths[2], true); // delete conf and jar file.
        shutFS.close();
      } catch (Exception e) {
View Full Code Here

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

        if (report.getYarnApplicationState() == YarnApplicationState.FINISHED
            || report.getYarnApplicationState() == YarnApplicationState.KILLED
            || report.getYarnApplicationState() == YarnApplicationState.FAILED) {
          return "Application " + applicationId + " is not running";
        } else {
          client.killApplication(applicationId);
          return "Kill request for " + applicationId + " sent";
        }
      }

    }, args);
View Full Code Here

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

        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);
      } catch (Throwable e) {
        log.error("Error in main method", e);
      } finally {
        if (context != null) {
          context.close();
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.