From a28cd02ba026733e409807f3ea1b36f7d57bc273 Mon Sep 17 00:00:00 2001 From: Devaraj K Date: Fri, 8 May 2015 10:54:36 +0530 Subject: [PATCH] YARN-3592. Fix typos in RMNodeLabelsManager. Contributed by Sunil G. --- hadoop-yarn-project/CHANGES.txt | 2 ++ .../nodelabels/RMNodeLabelsManager.java | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index f8a2cc0332..a698a7d81e 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -342,6 +342,8 @@ Release 2.8.0 - UNRELEASED YARN-3572. Correct typos in WritingYarnApplications.md. (Gabor Liptak via aajisaka) + YARN-3592. Fix typos in RMNodeLabelsManager. (Sunil G via devaraj) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMNodeLabelsManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMNodeLabelsManager.java index 25e5bc0989..696b99b82f 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMNodeLabelsManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/nodelabels/RMNodeLabelsManager.java @@ -46,11 +46,11 @@ public class RMNodeLabelsManager extends CommonNodeLabelsManager { protected static class Queue { - protected Set acccessibleNodeLabels; + protected Set accessibleNodeLabels; protected Resource resource; protected Queue() { - acccessibleNodeLabels = + accessibleNodeLabels = Collections.newSetFromMap(new ConcurrentHashMap()); resource = Resource.newInstance(0, 0); } @@ -98,7 +98,7 @@ protected void checkRemoveFromClusterNodeLabelsOfQueue( // check if any queue contains this label for (Entry entry : queueCollections.entrySet()) { String queueName = entry.getKey(); - Set queueLabels = entry.getValue().acccessibleNodeLabels; + Set queueLabels = entry.getValue().accessibleNodeLabels; if (queueLabels.contains(label)) { throw new IOException("Cannot remove label=" + label + ", because queue=" + queueName + " is using this label. " @@ -275,7 +275,7 @@ public void reinitializeQueueLabels(Map> queueToLabels) { continue; } - q.acccessibleNodeLabels.addAll(labels); + q.accessibleNodeLabels.addAll(labels); for (Host host : nodeCollections.values()) { for (Entry nentry : host.nms.entrySet()) { NodeId nodeId = nentry.getKey(); @@ -468,7 +468,7 @@ private boolean isNodeUsableByQueue(Set nodeLabels, Queue q) { } for (String label : nodeLabels) { - if (q.acccessibleNodeLabels.contains(label)) { + if (q.accessibleNodeLabels.contains(label)) { return true; } }