YARN-4623. TestSystemMetricsPublisher#testPublishAppAttemptMetricsForUnmanagedAM fails with NPE on branch-2.7. Contributed by Naganarasimha G R.
This commit is contained in:
parent
63bb912749
commit
83fd33d5fe
|
@ -72,6 +72,9 @@ Release 2.7.3 - UNRELEASED
|
|||
YARN-4610. Reservations continue looking for one app causes other apps to
|
||||
starve (jlowe)
|
||||
|
||||
YARN-4623. TestSystemMetricsPublisher#testPublishAppAttemptMetricsForUnmanagedAM
|
||||
fails with NPE on branch-2.7. (Naganarasimha G R via junping_du)
|
||||
|
||||
Release 2.7.2 - UNRELEASED
|
||||
|
||||
INCOMPATIBLE CHANGES
|
||||
|
|
|
@ -160,6 +160,8 @@ public class SystemMetricsPublisher extends CompositeService {
|
|||
public void appAttemptFinished(RMAppAttempt appAttempt,
|
||||
RMAppAttemptState appAttemtpState, RMApp app, long finishedTime) {
|
||||
if (publishSystemMetrics) {
|
||||
ContainerId container = (appAttempt.getMasterContainer() == null) ? null
|
||||
: appAttempt.getMasterContainer().getId();
|
||||
dispatcher.getEventHandler().handle(
|
||||
new AppAttemptFinishedEvent(
|
||||
appAttempt.getAppAttemptId(),
|
||||
|
@ -171,7 +173,7 @@ public class SystemMetricsPublisher extends CompositeService {
|
|||
app.getFinalApplicationStatus(),
|
||||
RMServerUtils.createApplicationAttemptState(appAttemtpState),
|
||||
finishedTime,
|
||||
appAttempt.getMasterContainer().getId()));
|
||||
container));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue