From fcdb1e7fec45ded55e8b7fdc29f8caf85547cca3 Mon Sep 17 00:00:00 2001 From: Eric Badger Date: Fri, 26 Feb 2021 19:03:59 +0000 Subject: [PATCH] YARN-10653. Fixed the findbugs issues introduced by YARN-10647. Contributed by Qi Zhu --- .../apache/hadoop/yarn/nodelabels/CommonNodeLabelsManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/CommonNodeLabelsManager.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/CommonNodeLabelsManager.java index 5b9382fcff..c19faaaad3 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/CommonNodeLabelsManager.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-common/src/main/java/org/apache/hadoop/yarn/nodelabels/CommonNodeLabelsManager.java @@ -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;