Package org.apache.hadoop.yarn.api.protocolrecords

Examples of org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse


  public ApplicationReport getApplicationReport(ApplicationId appId)
      throws YarnRemoteException {
    GetApplicationReportRequest request =
        Records.newRecord(GetApplicationReportRequest.class);
    request.setApplicationId(appId);
    GetApplicationReportResponse response =
        rmClient.getApplicationReport(request);
    return response.getApplicationReport();
  }
View Full Code Here


  public ApplicationReport getApplicationReport(ApplicationId appId)
      throws YarnRemoteException {
    GetApplicationReportRequest request =
        Records.newRecord(GetApplicationReportRequest.class);
    request.setApplicationId(appId);
    GetApplicationReportResponse response =
        rmClient.getApplicationReport(request);
    return response.getApplicationReport();
  }
View Full Code Here

    RecordFactory recordFactory = RecordFactoryProvider.getRecordFactory(null);
    GetApplicationReportRequest request = recordFactory
        .newRecordInstance(GetApplicationReportRequest.class);
    request.setApplicationId(recordFactory
        .newRecordInstance(ApplicationId.class));
    GetApplicationReportResponse applicationReport = rmService
        .getApplicationReport(request);
    Assert.assertNull("It should return null as application report for absent application.",
        applicationReport.getApplicationReport());
  }
View Full Code Here

        NetUtils.createSocketAddr(report.getHost(), report.getRpcPort()), conf);
    GetApplicationReportRequest reportRequest = Records
        .newRecord(GetApplicationReportRequest.class);
    reportRequest.setApplicationId(submitClient.getId());

    GetApplicationReportResponse reportResponse = applicationsManager
        .getApplicationReport(reportRequest);
    ApplicationReport localReport = reportResponse.getApplicationReport();
    long clientSuperStep = -1L;
    while (localReport.getFinalApplicationStatus() != null
        && localReport.getFinalApplicationStatus().ordinal() == 0) {
      LOG.debug("currently in state: "
          + localReport.getFinalApplicationStatus());
      if (verbose) {
        long remoteSuperStep = client.getCurrentSuperStep().get();
        if (clientSuperStep < remoteSuperStep) {
          clientSuperStep = remoteSuperStep;
          LOG.info("Current supersteps number: " + clientSuperStep);
        }
      }
      reportResponse = applicationsManager.getApplicationReport(reportRequest);
      localReport = reportResponse.getApplicationReport();

      Thread.sleep(3000L);
    }

    if (localReport.getFinalApplicationStatus() == FinalApplicationStatus.SUCCEEDED) {
View Full Code Here

    GetApplicationReportRequest reportRequest = Records
        .newRecord(GetApplicationReportRequest.class);
    reportRequest.setApplicationId(id);
    while (report == null || report.getHost().equals("N/A")) {
      GetApplicationReportResponse reportResponse = job
          .getApplicationsManager().getApplicationReport(reportRequest);
      report = reportResponse.getApplicationReport();
      try {
        Thread.sleep(1000L);
      } catch (InterruptedException e) {
        LOG.error(
            "Got interrupted while waiting for a response report from AM.", e);
View Full Code Here

  throws YarnException, IOException {
    GetApplicationReportRequest request = recordFactory
        .newRecordInstance(GetApplicationReportRequest.class);
    request.setApplicationId(appId);
   
    GetApplicationReportResponse response = applicationsManager
        .getApplicationReport(request);
    return response.getApplicationReport();
  }
View Full Code Here

  public ApplicationReport getApplicationReport(ApplicationId appId)
      throws YarnException, IOException {
    GetApplicationReportRequest request =
        Records.newRecord(GetApplicationReportRequest.class);
    request.setApplicationId(appId);
    GetApplicationReportResponse response =
        rmClient.getApplicationReport(request);
    return response.getApplicationReport();
  }
View Full Code Here

    }

    @Override
    public void start() {
      rmClient = mock(ApplicationClientProtocol.class);
      GetApplicationReportResponse mockResponse =
          mock(GetApplicationReportResponse.class);
      mockReport = mock(ApplicationReport.class);
      try{
        when(rmClient.getApplicationReport(any(
            GetApplicationReportRequest.class))).thenReturn(mockResponse);
      } catch (YarnException e) {
        Assert.fail("Exception is not expected.");
      } catch (IOException e) {
        Assert.fail("Exception is not expected.");
      }
      when(mockResponse.getApplicationReport()).thenReturn(mockReport);
    }
View Full Code Here

    boolean allowAccess = checkAccess(callerUGI, application.getUser(),
        ApplicationAccessType.VIEW_APP, applicationId);
    ApplicationReport report =
        application.createAndGetApplicationReport(allowAccess);

    GetApplicationReportResponse response = recordFactory
        .newRecordInstance(GetApplicationReportResponse.class);
    response.setApplicationReport(report);
    return response;
  }
View Full Code Here

    // Get the app-report.
    GetApplicationReportRequest request =
        Records.newRecord(GetApplicationReportRequest.class);
    request.setApplicationId(app.getApplicationId());
    GetApplicationReportResponse reportResponse =
        rm.getClientRMService().getApplicationReport(request);
    ApplicationReport appReport = reportResponse.getApplicationReport();
    org.apache.hadoop.yarn.api.records.Token clientToAMToken =
        appReport.getClientToAMToken();

    ApplicationAttemptId appAttempt = app.getCurrentAppAttempt().getAppAttemptId();
    final MockAM mockAM =
View Full Code Here

TOP

Related Classes of org.apache.hadoop.yarn.api.protocolrecords.GetApplicationReportResponse

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.