YARN-4748. ApplicationHistoryManagerOnTimelineStore should not swallow exceptions on generateApplicationReport. Contributed by Li Lu

This commit is contained in:
Jian He 2016-02-29 18:19:09 -08:00
parent d8f390d015
commit d93c22ec27
2 changed files with 12 additions and 0 deletions

View File

@ -1477,6 +1477,9 @@ Release 2.8.0 - UNRELEASED
YARN-4709. NMWebServices produces incorrect JSON for containers.
(Varun Saxena via vvasudev)
YARN-4748. ApplicationHistoryManagerOnTimelineStore should not
swallow exceptions on generateApplicationReport. (Li Lu via jianhe)
Release 2.7.3 - UNRELEASED
INCOMPATIBLE CHANGES

View File

@ -625,6 +625,15 @@ public class ApplicationHistoryManagerOnTimelineStore extends AbstractService
}
} catch (AuthorizationException | ApplicationAttemptNotFoundException e) {
// AuthorizationException is thrown because the user doesn't have access
if (e instanceof AuthorizationException) {
LOG.warn("Failed to authorize when generating application report for "
+ app.appReport.getApplicationId()
+ ". Use a placeholder for its latest attempt id. ", e);
} else { // Attempt not found
LOG.info("No application attempt found for "
+ app.appReport.getApplicationId()
+ ". Use a placeholder for its latest attempt id. ", e);
}
// It's possible that the app is finished before the first attempt is created.
app.appReport.setDiagnostics(null);
app.appReport.setCurrentApplicationAttemptId(null);