YARN-4634. Scheduler UI/Metrics need to consider cases like non-queue label mappings. (Sunil G via wangda)
(cherry picked from commit 12b11e2e688158404feeb3ded37eb6cccad4ea5c)
This commit is contained in:
parent
5e94e539e0
commit
6d454a5d6e
@ -405,8 +405,20 @@ public void render(Block html) {
|
|||||||
CapacitySchedulerInfo sinfo = new CapacitySchedulerInfo(root, cs);
|
CapacitySchedulerInfo sinfo = new CapacitySchedulerInfo(root, cs);
|
||||||
csqinfo.csinfo = sinfo;
|
csqinfo.csinfo = sinfo;
|
||||||
|
|
||||||
if (null == nodeLabelsInfo || (nodeLabelsInfo.size() == 1
|
boolean hasAnyLabelLinkedToNM = false;
|
||||||
&& nodeLabelsInfo.get(0).getLabelName().isEmpty())) {
|
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;
|
used = sinfo.getUsedCapacity() / 100;
|
||||||
//label is not enabled in the cluster or there's only "default" label,
|
//label is not enabled in the cluster or there's only "default" label,
|
||||||
ul.li().
|
ul.li().
|
||||||
|
Loading…
x
Reference in New Issue
Block a user