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."); URI trackingUri; if (original == null || original.equals("N/A") || original.equals("")) { if (fetchedAppReport.getAppReportSource() == AppReportSource.RM) { ProxyUtils.sendRedirect(req, resp, StringHelper.pjoin(rmAppPageUrlBase, id.toString())); } else if (fetchedAppReport.getAppReportSource() == AppReportSource.AHS) {
fetchedAppReport.getAppReportSource());
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."); URI trackingUri; if (original == null || original.equals("N/A") || original.equals("")) { if (fetchedAppReport.getAppReportSource() == AppReportSource.RM) { ProxyUtils.sendRedirect(req, resp, StringHelper.pjoin(rmAppPageUrlBase, id.toString())); } else if (fetchedAppReport.getAppReportSource() == AppReportSource.AHS) {
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."); URI trackingUri; if (original == null || original.equals("N/A") || original.equals("")) { if (fetchedAppReport.getAppReportSource() == AppReportSource.RM) { ProxyUtils.sendRedirect(req, resp, StringHelper.pjoin(rmAppPageUrlBase, id.toString())); } else if (fetchedAppReport.getAppReportSource() == AppReportSource.AHS) {
/** * 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; }