YARN-10653. Fixed the findbugs issues introduced by YARN-10647. Contributed by

Qi Zhu

(cherry picked from commit fcdb1e7fec)
This commit is contained in:
Eric Badger 2021-02-26 19:17:24 +00:00
parent 929411acce
commit 49375c0b53
1 changed files with 1 additions and 1 deletions

View File

@ -645,7 +645,7 @@ public class CommonNodeLabelsManager extends AbstractService {
host.labels.addAll(labels); host.labels.addAll(labels);
for (Node node : host.nms.values()) { for (Node node : host.nms.values()) {
replaceNodeForLabels(node.nodeId, node.labels, labels); replaceNodeForLabels(node.nodeId, node.labels, labels);
if (node.labels != null && labels != null) { if (node.labels != null) {
replaceLabelsForNode(node.nodeId, node.labels, labels); replaceLabelsForNode(node.nodeId, node.labels, labels);
} }
node.labels = null; node.labels = null;