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 fd750031ad..06a22d65b3 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 @@ private void selectRpcInputStreams(Collection streams, 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 @@ private void selectStreamingInputStreams( Map 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 allStreams = new PriorityQueue(64,