/** * Fetch the application report from the RM. * * @param id the app ID * @return the application report * @throws IOException if the request to the RM fails * @throws YarnException if the request to the RM fails */ private FetchedAppReport getFetchedAppReport(ApplicationId id) throws IOException, YarnException { FetchedAppReport fetchedAppReport = getApplicationReport(id); if (fetchedAppReport != null) { if ((fetchedAppReport.getAppReportSource() != AppReportSource.RM) && (fetchedAppReport.getAppReportSource() != AppReportSource.AHS)) { throw new UnsupportedOperationException("Application report not " + "fetched from RM or history server."); } } return fetchedAppReport; }
ApplicationReport applicationReport = null; try { fetchedAppReport = getApplicationReport(id); if (fetchedAppReport != null) { if (fetchedAppReport.getAppReportSource() != AppReportSource.RM &&
ApplicationReport applicationReport = null; try { fetchedAppReport = getApplicationReport(id); if (fetchedAppReport != null) { if (fetchedAppReport.getAppReportSource() != AppReportSource.RM &&
ApplicationReport applicationReport = null; try { fetchedAppReport = getApplicationReport(id); if (fetchedAppReport != null) { if (fetchedAppReport.getAppReportSource() != AppReportSource.RM &&