diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java index 65bde635a73..b4356cb6abf 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/main/java/org/apache/hadoop/yarn/server/nodemanager/NodeStatusUpdaterImpl.java @@ -1208,9 +1208,12 @@ public class NodeStatusUpdaterImpl extends AbstractService implements public void verifyRMHeartbeatResponseForNodeLabels( NodeHeartbeatResponse response) { if (areLabelsSentToRM) { - if (response.getAreNodeLabelsAcceptedByRM() && LOG.isDebugEnabled()) { - LOG.debug("Node Labels {" + StringUtils.join(",", previousNodeLabels) - + "} were Accepted by RM "); + if (response.getAreNodeLabelsAcceptedByRM()) { + if(LOG.isDebugEnabled()){ + LOG.debug( + "Node Labels {" + StringUtils.join(",", previousNodeLabels) + + "} were Accepted by RM "); + } } else { // case where updated labels from NodeLabelsProvider is sent to RM and // RM rejected the labels