HDFS-16391. Avoid evaluation of LOG.debug statement in NameNodeHeartbeatService (#3820)
This commit is contained in:
parent
9420cb6f8a
commit
8d251bd629
@ -267,12 +267,16 @@ private void updateState() {
|
|||||||
LOG.error("Namenode is not operational: {}", getNamenodeDesc());
|
LOG.error("Namenode is not operational: {}", getNamenodeDesc());
|
||||||
} else if (report.haStateValid()) {
|
} else if (report.haStateValid()) {
|
||||||
// block and HA status available
|
// block and HA status available
|
||||||
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug("Received service state: {} from HA namenode: {}",
|
LOG.debug("Received service state: {} from HA namenode: {}",
|
||||||
report.getState(), getNamenodeDesc());
|
report.getState(), getNamenodeDesc());
|
||||||
|
}
|
||||||
} else if (localTarget == null) {
|
} else if (localTarget == null) {
|
||||||
// block info available, HA status not expected
|
// block info available, HA status not expected
|
||||||
|
if (LOG.isDebugEnabled()) {
|
||||||
LOG.debug(
|
LOG.debug(
|
||||||
"Reporting non-HA namenode as operational: " + getNamenodeDesc());
|
"Reporting non-HA namenode as operational: {}", getNamenodeDesc());
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// block info available, HA status should be available, but was not
|
// block info available, HA status should be available, but was not
|
||||||
// fetched do nothing and let the current state stand
|
// fetched do nothing and let the current state stand
|
||||||
|
Loading…
Reference in New Issue
Block a user