hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rohithsharm...@apache.org
Subject [1/2] hadoop git commit: YARN-5873. RM crashes with NPE if generic application history is enabled. Contributed by Varun Saxena.
Date Tue, 15 Nov 2016 05:32:19 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 04014c4c7 -> b7070f330


YARN-5873. RM crashes with NPE if generic application history is enabled. Contributed by Varun
Saxena.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/296c5de0
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/296c5de0
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/296c5de0

Branch: refs/heads/trunk
Commit: 296c5de0cfee88389cf9f90263280b2034e54cd5
Parents: 04014c4
Author: Rohith Sharma K S <rohithsharmaks@apache.org>
Authored: Tue Nov 15 10:56:28 2016 +0530
Committer: Rohith Sharma K S <rohithsharmaks@apache.org>
Committed: Tue Nov 15 10:56:28 2016 +0530

----------------------------------------------------------------------
 .../server/resourcemanager/rmcontainer/RMContainerImpl.java   | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/296c5de0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
index a651d54..f5d8b5b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/rmcontainer/RMContainerImpl.java
@@ -247,7 +247,9 @@ public class RMContainerImpl implements RMContainer, Comparable<RMContainer>
{
        YarnConfiguration
                  .DEFAULT_APPLICATION_HISTORY_SAVE_NON_AM_CONTAINER_META_INFO);
 
-    rmContext.getRMApplicationHistoryWriter().containerStarted(this);
+    if (container.getId() != null) {
+      rmContext.getRMApplicationHistoryWriter().containerStarted(this);
+    }
 
     // If saveNonAMContainerMetaInfo is true, store system metrics for all
     // containers. If false, and if this container is marked as the AM, metrics
@@ -892,6 +894,9 @@ public class RMContainerImpl implements RMContainer, Comparable<RMContainer>
{
     // container creation event to timeline service when id assigned.
     container.setId(containerId);
 
+    if (containerId != null) {
+      rmContext.getRMApplicationHistoryWriter().containerStarted(this);
+    }
     // If saveNonAMContainerMetaInfo is true, store system metrics for all
     // containers. If false, and if this container is marked as the AM, metrics
     // will still be published for this container, but that calculation happens


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message