You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by so...@apache.org on 2021/08/06 08:27:38 UTC
[hadoop] branch trunk updated: HDFS-16153. Avoid evaluation of
LOG.debug statement in QuorumJournalManager (#3269). Contributed by
wangzhaohui.
This is an automated email from the ASF dual-hosted git repository.
sodonnell pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/trunk by this push:
new a73b64f HDFS-16153. Avoid evaluation of LOG.debug statement in QuorumJournalManager (#3269). Contributed by wangzhaohui.
a73b64f is described below
commit a73b64f86b733177cf9b8b10088527e34099d73f
Author: wangzhaohui <32...@users.noreply.github.com>
AuthorDate: Fri Aug 6 16:27:05 2021 +0800
HDFS-16153. Avoid evaluation of LOG.debug statement in QuorumJournalManager (#3269). Contributed by wangzhaohui.
---
.../apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java
index fd75003..06a22d6 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/qjournal/client/QuorumJournalManager.java
@@ -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,
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org