From f8807839c686128bbb12d3c3608a91ddbdac2343 Mon Sep 17 00:00:00 2001 From: Wangda Tan Date: Fri, 8 May 2015 12:04:50 -0700 Subject: [PATCH] YARN-3593. Add label-type and Improve "DEFAULT_PARTITION" in Node Labels Page. (Naganarasimha G R via wangda) (cherry picked from commit f55d21d89448b81eba6ecbaa4d57bf535461ce73) --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../yarn/server/resourcemanager/webapp/NodeLabelsPage.java | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index c2f8fb857b8..4ef3301c959 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -154,6 +154,9 @@ Release 2.8.0 - UNRELEASED YARN-20. More information for "yarn.resourcemanager.webapp.address" in yarn-default.xml (Bartosz Ɓugowski vai tgraves) + YARN-3593. Add label-type and Improve "DEFAULT_PARTITION" in Node Labels Page. + (Naganarasimha G R via wangda) + OPTIMIZATIONS YARN-3339. TestDockerContainerExecutor should pull a single image and not 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/NodeLabelsPage.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodeLabelsPage.java index 74585587553..b0b301a1310 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodeLabelsPage.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/main/java/org/apache/hadoop/yarn/server/resourcemanager/webapp/NodeLabelsPage.java @@ -49,6 +49,7 @@ public class NodeLabelsPage extends RmView { thead(). tr(). th(".name", "Label Name"). + th(".type", "Label Type"). th(".numOfActiveNMs", "Num Of Active NMs"). th(".totalResource", "Total Resource"). _()._(). @@ -58,8 +59,12 @@ public class NodeLabelsPage extends RmView { for (RMNodeLabel info : nlm.pullRMNodeLabelsInfo()) { TR>> row = tbody.tr().td( - info.getLabelName().isEmpty() ? "" : info + info.getLabelName().isEmpty() ? "" : info .getLabelName()); + String type = + (info.getIsExclusive()) ? "Exclusive Partition" + : "Non Exclusive Partition"; + row = row.td(type); int nActiveNMs = info.getNumActiveNMs(); if (nActiveNMs > 0) { row = row.td()