bharatviswa504 commented on a change in pull request #1612: HDDS-2260. Avoid 
evaluation of LOG.trace and LOG.debug statement in the read/write path (HDDS).
URL: https://github.com/apache/hadoop/pull/1612#discussion_r332613431
 
 

 ##########
 File path: 
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java
 ##########
 @@ -392,22 +392,26 @@ private void watchForCommit(boolean bufferFull) throws 
IOException {
               .equals(responseBlockID.getContainerBlockID()));
           // updates the bcsId of the block
           blockID = responseBlockID;
-          LOG.debug(
-              "Adding index " + asyncReply.getLogIndex() + " commitMap size "
-                  + commitWatcher.getCommitInfoMapSize() + " flushLength "
-                  + flushPos + " numBuffers " + byteBufferList.size()
-                  + " blockID " + blockID + " bufferPool size" + bufferPool
-                  .getSize() + " currentBufferIndex " + bufferPool
-                  .getCurrentBufferIndex());
+          if (LOG.isDebugEnabled()) {
+            LOG.debug(
+                "Adding index " + asyncReply.getLogIndex() + " commitMap size "
+                    + commitWatcher.getCommitInfoMapSize() + " flushLength "
+                    + flushPos + " numBuffers " + byteBufferList.size()
 
 Review comment:
   Use {}

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to