HDFS-16153. Avoid evaluation of LOG.debug statement in QuorumJournalManager (#3269). Contributed by wangzhaohui.
This commit is contained in:
parent
9fe1f24ec1
commit
a73b64f86b
|
@ -586,7 +586,7 @@ public class QuorumJournalManager implements JournalManager {
|
|||
responseCounts.get(responseCounts.size() - loggers.getMajoritySize());
|
||||
if (maxAllowedTxns == 0) {
|
||||
LOG.debug("No new edits available in logs; requested starting from " +
|
||||
"ID " + fromTxnId);
|
||||
"ID {}", fromTxnId);
|
||||
return;
|
||||
}
|
||||
LogAction logAction = selectInputStreamLogHelper.record(fromTxnId);
|
||||
|
@ -618,9 +618,10 @@ public class QuorumJournalManager implements JournalManager {
|
|||
Map<AsyncLogger, RemoteEditLogManifest> resps =
|
||||
loggers.waitForWriteQuorum(q, selectInputStreamsTimeoutMs,
|
||||
"selectStreamingInputStreams");
|
||||
|
||||
LOG.debug("selectStreamingInputStream manifests:\n" +
|
||||
Joiner.on("\n").withKeyValueSeparator(": ").join(resps));
|
||||
if (LOG.isDebugEnabled()) {
|
||||
LOG.debug("selectStreamingInputStream manifests:\n {}",
|
||||
Joiner.on("\n").withKeyValueSeparator(": ").join(resps));
|
||||
}
|
||||
|
||||
final PriorityQueue<EditLogInputStream> allStreams =
|
||||
new PriorityQueue<EditLogInputStream>(64,
|
||||
|
|
Loading…
Reference in New Issue