hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From asur...@apache.org
Subject [1/5] hadoop git commit: YARN-1382. Remove unusableRMNodesConcurrentSet (never used) in NodeListManager to get rid of memory leak. Contributed by Rohith Sharma K S.
Date Sat, 02 Jan 2016 23:08:15 GMT
Repository: hadoop
Updated Branches:
  refs/heads/yarn-2877 ad997fab6 -> 4e4b3a846


YARN-1382. Remove unusableRMNodesConcurrentSet (never used) in NodeListManager to get rid
of memory leak. Contributed by Rohith Sharma K S.


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

Branch: refs/heads/yarn-2877
Commit: 223ce323bb81463ec5c5ac7316738370d4a47366
Parents: ad997fa
Author: Junping Du <junping_du@apache.org>
Authored: Wed Dec 30 07:52:07 2015 -0800
Committer: Junping Du <junping_du@apache.org>
Committed: Wed Dec 30 07:52:07 2015 -0800

----------------------------------------------------------------------
 hadoop-yarn-project/CHANGES.txt                 |  3 +++
 .../resourcemanager/NodesListManager.java       | 22 +-------------------
 2 files changed, 4 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/223ce323/hadoop-yarn-project/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt
index ceb3791..b9789b8 100644
--- a/hadoop-yarn-project/CHANGES.txt
+++ b/hadoop-yarn-project/CHANGES.txt
@@ -1202,6 +1202,9 @@ Release 2.8.0 - UNRELEASED
     YARN-4400. AsyncDispatcher.waitForDrained should be final. (Daniel Templeton 
     via junping_du)
 
+    YARN-1382. Remove unusableRMNodesConcurrentSet (never used) in NodeListManager
+    to get rid of memory leak. (Rohith Sharma K S via junping_du)
+
 Release 2.7.3 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/223ce323/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.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/NodesListManager.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java
index 1e8b98a..4d9922b 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/NodesListManager.java
@@ -19,8 +19,6 @@
 package org.apache.hadoop.yarn.server.resourcemanager;
 
 import java.io.IOException;
-import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Map.Entry;
 import java.util.Set;
@@ -62,9 +60,6 @@ public class NodesListManager extends CompositeService implements
 
   private HostsFileReader hostsReader;
   private Configuration conf;
-  private Set<RMNode> unusableRMNodesConcurrentSet = Collections
-      .newSetFromMap(new ConcurrentHashMap<RMNode,Boolean>());
-  
   private final RMContext rmContext;
 
   private String includesFile;
@@ -290,24 +285,12 @@ public class NodesListManager extends CompositeService implements
     }
   }
 
-  /**
-   * Provides the currently unusable nodes. Copies it into provided collection.
-   * @param unUsableNodes
-   *          Collection to which the unusable nodes are added
-   * @return number of unusable nodes added
-   */
-  public int getUnusableNodes(Collection<RMNode> unUsableNodes) {
-    unUsableNodes.addAll(unusableRMNodesConcurrentSet);
-    return unusableRMNodesConcurrentSet.size();
-  }
-
   @Override
   public void handle(NodesListManagerEvent event) {
     RMNode eventNode = event.getNode();
     switch (event.getType()) {
     case NODE_UNUSABLE:
       LOG.debug(eventNode + " reported unusable");
-      unusableRMNodesConcurrentSet.add(eventNode);
       for(RMApp app: rmContext.getRMApps().values()) {
         if (!app.isAppFinalStateStored()) {
           this.rmContext
@@ -320,10 +303,7 @@ public class NodesListManager extends CompositeService implements
       }
       break;
     case NODE_USABLE:
-      if (unusableRMNodesConcurrentSet.contains(eventNode)) {
-        LOG.debug(eventNode + " reported usable");
-        unusableRMNodesConcurrentSet.remove(eventNode);
-      }
+      LOG.debug(eventNode + " reported usable");
       for (RMApp app : rmContext.getRMApps().values()) {
         if (!app.isAppFinalStateStored()) {
           this.rmContext


Mime
View raw message