From 49375c0b536cd8b84d100a50a7f8cd1c3951bfd2 Mon Sep 17 00:00:00 2001 From: Eric Badger Date: Fri, 26 Feb 2021 19:17:24 +0000 Subject: [PATCH] YARN-10653. Fixed the findbugs issues introduced by YARN-10647. Contributed by Qi Zhu (cherry picked from commit fcdb1e7fec45ded55e8b7fdc29f8caf85547cca3) --- .../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 b43e9337ba4..17a5a4b029f 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 @@ -645,7 +645,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;