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

Qi Zhu

(cherry picked from commit fcdb1e7fec45ded55e8b7fdc29f8caf85547cca3)
This commit is contained in:
Eric Badger 2021-02-26 19:07:59 +00:00
parent a6f86af39f
commit e4dcc31114

View File

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