YARN-7647. NM print inappropriate error log when node-labels is enabled. Contributed by Yang Wang.

This commit is contained in:
Weiwei Yang 2017-12-13 13:11:41 +08:00
parent 118d653eea
commit dff710632e
1 changed files with 6 additions and 3 deletions

View File

@ -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