diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index d87a22214fc..cffd2d4eaa4 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -23,6 +23,9 @@ Release 2.7.2 - UNRELEASED YARN-3690. [JDK8] 'mvn site' fails. (Brahma Reddy Battula via aajisaka) + YARN-3905. Application History Server UI NPEs when accessing apps run after + RM restart (Eric Payne via jeagles) + Release 2.7.1 - 2015-07-06 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java index e635c9f7a79..140d5eab5d8 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-common/src/main/java/org/apache/hadoop/yarn/server/webapp/AppBlock.java @@ -36,7 +36,6 @@ import org.apache.hadoop.yarn.api.protocolrecords.GetContainerReportRequest; import org.apache.hadoop.yarn.api.records.ApplicationAttemptReport; import org.apache.hadoop.yarn.api.records.ApplicationId; import org.apache.hadoop.yarn.api.records.ApplicationReport; -import org.apache.hadoop.yarn.api.records.ContainerId; import org.apache.hadoop.yarn.api.records.ContainerReport; import org.apache.hadoop.yarn.api.records.FinalApplicationStatus; import org.apache.hadoop.yarn.api.records.YarnApplicationState; @@ -227,10 +226,9 @@ public class AppBlock extends HtmlBlock { AppAttemptInfo appAttempt = new AppAttemptInfo(appAttemptReport); ContainerReport containerReport = null; try { - // AM container is always the first container of the attempt final GetContainerReportRequest request = - GetContainerReportRequest.newInstance(ContainerId.newContainerId( - appAttemptReport.getApplicationAttemptId(), 1)); + GetContainerReportRequest.newInstance( + appAttemptReport.getAMContainerId()); if (callerUGI == null) { containerReport = appBaseProt.getContainerReport(request).getContainerReport();