hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ka...@apache.org
Subject [1/2] hadoop git commit: Patch v3. javac, javadoc and checkstyle warnings
Date Fri, 15 Jul 2016 21:43:29 GMT
Repository: hadoop
Updated Branches:
  refs/heads/yarn-5181 [created] 305b6bc03


Patch v3. javac, javadoc and checkstyle warnings


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

Branch: refs/heads/yarn-5181
Commit: 305b6bc038760ffc6847e09bd838e88c2bcdecf7
Parents: 7dd94b6
Author: Karthik Kambatla <kasha@cloudera.com>
Authored: Fri Jul 15 12:15:20 2016 -0700
Committer: Karthik Kambatla <kasha@cloudera.com>
Committed: Fri Jul 15 12:15:48 2016 -0700

----------------------------------------------------------------------
 .../resourcemanager/scheduler/ClusterNodeTracker.java     | 10 +++++++---
 .../resourcemanager/scheduler/TestClusterNodeTracker.java |  3 ++-
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/305b6bc0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ClusterNodeTracker.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/scheduler/ClusterNodeTracker.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ClusterNodeTracker.java
index 1f82b98..e487f69 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ClusterNodeTracker.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/ClusterNodeTracker.java
@@ -310,21 +310,25 @@ public class ClusterNodeTracker<N extends SchedulerNode> {
   /**
    * Convenience method to return list of nodes corresponding to resourceName
    * passed in the {@link ResourceRequest}.
+   *
+   * @param resourceName Host/rack name of the resource, or
+   * {@link ResourceRequest#ANY}
+   * @return list of nodes that match the resourceName
    */
   public List<N> getNodesByResourceName(final String resourceName) {
     Preconditions.checkArgument(
         resourceName != null && !resourceName.isEmpty());
-    List<N> nodes = new ArrayList<>();
+    List<N> retNodes = new ArrayList<>();
     if (ResourceRequest.ANY.equals(resourceName)) {
       return getAllNodes();
     } else if (nodeNameToNodeMap.containsKey(resourceName)) {
-      nodes.add(nodeNameToNodeMap.get(resourceName));
+      retNodes.add(nodeNameToNodeMap.get(resourceName));
     } else if (nodesPerRack.containsKey(resourceName)) {
       return nodesPerRack.get(resourceName);
     } else {
       LOG.info(
           "Could not find a node matching given resourceName " + resourceName);
     }
-    return nodes;
+    return retNodes;
   }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/hadoop/blob/305b6bc0/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestClusterNodeTracker.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestClusterNodeTracker.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestClusterNodeTracker.java
index 25d7993..7f527f1 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestClusterNodeTracker.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/scheduler/TestClusterNodeTracker.java
@@ -34,7 +34,8 @@ import static org.junit.Assert.assertEquals;
  * loss of generality.
  */
 public class TestClusterNodeTracker {
-  ClusterNodeTracker<FSSchedulerNode> nodeTracker = new ClusterNodeTracker();
+  private ClusterNodeTracker<FSSchedulerNode> nodeTracker =
+      new ClusterNodeTracker<>();
 
   @Before
   public void setup() {


---------------------------------------------------------------------
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