Skip to content

Commit

Permalink
YARN-4634. Scheduler UI/Metrics need to consider cases like non-queue…
Browse files Browse the repository at this point in the history
… label mappings. (Sunil G via wangda)
  • Loading branch information
wangdatan committed Mar 31, 2016
1 parent 0dd9bca commit 12b11e2
Showing 1 changed file with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,8 +405,20 @@ public void render(Block html) {
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().
Expand Down

0 comments on commit 12b11e2

Please sign in to comment.