Package org.apache.hadoop.yarn.exceptions

Examples of org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException


    result = cli.run(new String[] { "application","-kill", applicationId.toString() });
    assertEquals(0, result);
    verify(client).killApplication(any(ApplicationId.class));
    verify(sysOut).println("Killing application application_1234_0005");

    doThrow(new ApplicationNotFoundException("Application with id '"
        + applicationId + "' doesn't exist in RM.")).when(client)
        .getApplicationReport(applicationId);
    cli = createAndGetAppCLI();
    try {
      int exitCode =
View Full Code Here


    verify(client).moveApplicationAcrossQueues(any(ApplicationId.class),
        any(String.class));
    verify(sysOut).println("Moving application application_1234_0005 to queue targetqueue");
    verify(sysOut).println("Successfully completed move.");

    doThrow(new ApplicationNotFoundException("Application with id '"
        + applicationId + "' doesn't exist in RM.")).when(client)
        .moveApplicationAcrossQueues(applicationId, "targetqueue");
    cli = createAndGetAppCLI();
    try {
      result = cli.run(new String[] { "application", "-movetoqueue",
View Full Code Here

  @Test
  public void testGetApplicationReportException() throws Exception {
    ApplicationCLI cli = createAndGetAppCLI();
    ApplicationId applicationId = ApplicationId.newInstance(1234, 5);
    when(client.getApplicationReport(any(ApplicationId.class))).thenThrow(
        new ApplicationNotFoundException("Application with id '"
            + applicationId + "' doesn't exist in RM."));
    try {
      cli.run(new String[] { "-status", applicationId.toString() });
      Assert.fail();
    } catch (Exception ex) {
View Full Code Here

    result = cli.run(new String[] { "-kill", applicationId.toString() });
    assertEquals(0, result);
    verify(client).killApplication(any(ApplicationId.class));
    verify(sysOut).println("Killing application application_1234_0005");

    doThrow(new ApplicationNotFoundException("Application with id '"
        + applicationId + "' doesn't exist in RM.")).when(client)
        .getApplicationReport(applicationId);
    cli = createAndGetAppCLI();
    try {
      cli.run(new String[] { "-kill", applicationId.toString() });
View Full Code Here

    RMApp application = this.rmContext.getRMApps().get(applicationId);
    if (application == null) {
      // If the RM doesn't have the application, throw
      // ApplicationNotFoundException and let client to handle.
      throw new ApplicationNotFoundException("Application with id '"
          + applicationId + "' doesn't exist in RM.");
    }

    boolean allowAccess = checkAccess(callerUGI, application.getUser(),
        ApplicationAccessType.VIEW_APP, application);
View Full Code Here

    RMApp application = this.rmContext.getRMApps().get(applicationId);
    if (application == null) {
      RMAuditLogger.logFailure(callerUGI.getUserName(),
          AuditConstants.KILL_APP_REQUEST, "UNKNOWN", "ClientRMService",
          "Trying to kill an absent application", applicationId);
      throw new ApplicationNotFoundException("Trying to kill an absent"
          + " application " + applicationId);
    }

    if (!checkAccess(callerUGI, application.getUser(),
        ApplicationAccessType.MODIFY_APP, application)) {
View Full Code Here

  @Test
  public void testGetApplicationReportException() throws Exception {
    ApplicationCLI cli = createAndGetAppCLI();
    ApplicationId applicationId = ApplicationId.newInstance(1234, 5);
    when(client.getApplicationReport(any(ApplicationId.class))).thenThrow(
        new ApplicationNotFoundException("Application with id '"
            + applicationId + "' doesn't exist in RM."));
    try {
      cli.run(new String[] { "-status", applicationId.toString() });
      Assert.fail();
    } catch (Exception ex) {
View Full Code Here

    RMApp application = this.rmContext.getRMApps().get(applicationId);
    if (application == null) {
      // If the RM doesn't have the application, throw
      // ApplicationNotFoundException and let client to handle.
      throw new ApplicationNotFoundException("Application with id '"
          + applicationId + "' doesn't exist in RM.");
    }

    boolean allowAccess = checkAccess(callerUGI, application.getUser(),
        ApplicationAccessType.VIEW_APP, applicationId);
View Full Code Here

      Set<String> properties = new HashSet<String>();
      properties.add("id");
      properties.add("name");
      SliderApp sliderApp = getSliderApp(applicationId, properties);
      if (sliderApp == null) {
        throw new ApplicationNotFoundException(applicationId);
      }

      SliderClient sliderClient = getSliderClient();
      sliderClient.actionDestroy(sliderApp.getName());
    } finally {
View Full Code Here

      Set<String> properties = new HashSet<String>();
      properties.add("id");
      properties.add("name");
      final SliderApp sliderApp = getSliderApp(appId, properties);
      if (sliderApp == null)
        throw new ApplicationNotFoundException(appId);

      ApplicationId applicationId = UserGroupInformation.getBestUGI(null,
          "yarn").doAs(new PrivilegedExceptionAction<ApplicationId>() {
        public ApplicationId run() throws IOException, YarnException {
          SliderClient sliderClient = getSliderClient();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.exceptions.ApplicationNotFoundException

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.