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 3efe0bc1e18..f4870623dd4 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 @@ -1008,9 +1008,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