hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aengin...@apache.org
Subject [02/50] [abbrv] hadoop git commit: YARN-4634. Scheduler UI/Metrics need to consider cases like non-queue label mappings. (Sunil G via wangda)
Date Thu, 07 Apr 2016 21:46:30 GMT
YARN-4634. Scheduler UI/Metrics need to consider cases like non-queue label mappings. (Sunil
G via wangda)


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

Branch: refs/heads/HDFS-7240
Commit: 12b11e2e688158404feeb3ded37eb6cccad4ea5c
Parents: 0dd9bca
Author: Wangda Tan <wangda@apache.org>
Authored: Thu Mar 31 14:32:37 2016 -0700
Committer: Wangda Tan <wangda@apache.org>
Committed: Thu Mar 31 14:35:18 2016 -0700

----------------------------------------------------------------------
 .../webapp/CapacitySchedulerPage.java               | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/12b11e2e/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.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/webapp/CapacitySchedulerPage.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java
index 033152a..5abc250 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/CapacitySchedulerPage.java
@@ -405,8 +405,20 @@ class CapacitySchedulerPage extends RmView {
         CapacitySchedulerInfo sinfo = new CapacitySchedulerInfo(root, cs);
         csqinfo.csinfo = sinfo;
 
-        if (null == nodeLabelsInfo || (nodeLabelsInfo.size() == 1
-            && nodeLabelsInfo.get(0).getLabelName().isEmpty())) {
+        boolean hasAnyLabelLinkedToNM = false;
+        if (null != nodeLabelsInfo) {
+          for (RMNodeLabel label : nodeLabelsInfo) {
+            if (label.getLabelName().length() == 0) {
+              // Skip DEFAULT_LABEL
+              continue;
+            }
+            if (label.getNumActiveNMs() > 0) {
+              hasAnyLabelLinkedToNM = true;
+              break;
+            }
+          }
+        }
+        if (!hasAnyLabelLinkedToNM) {
           used = sinfo.getUsedCapacity() / 100;
           //label is not enabled in the cluster or there's only "default" label,
           ul.li().


Mime
View raw message