adoroszlai commented on a change in pull request #234: HDDS-2531. Sonar :
remove duplicate string literals in BlockOutputStream
URL: https://github.com/apache/hadoop-ozone/pull/234#discussion_r348308547
##########
File path:
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java
##########
@@ -391,26 +391,20 @@ private void watchForCommit(boolean bufferFull) throws
IOException {
.equals(responseBlockID.getContainerBlockID()));
// updates the bcsId of the block
blockID.set(responseBlockID);
- if (LOG.isDebugEnabled()) {
- LOG.debug(
- "Adding index " + asyncReply.getLogIndex() + " commitMap size "
- + commitWatcher.getCommitInfoMapSize() + " flushLength "
- + flushPos + " numBuffers " + byteBufferList.size()
- + " blockID " + blockID + " bufferPool size" + bufferPool
- .getSize() + " currentBufferIndex " + bufferPool
- .getCurrentBufferIndex());
- }
+ LOG.debug("Adding index {} commitMap size {} flushLength {} "
+ + "numBuffers {} blockID {} bufferPool size {} "
+ + "currentBufferIndex {}", asyncReply.getLogIndex(),
+ commitWatcher.getCommitInfoMapSize(), flushPos,
+ byteBufferList.size(), blockID, bufferPool.getSize(),
+ bufferPool.getCurrentBufferIndex());
// for standalone protocol, logIndex will always be 0.
commitWatcher
.updateCommitInfoMap(asyncReply.getLogIndex(), byteBufferList);
}
return e;
}, responseExecutor).exceptionally(e -> {
- if (LOG.isDebugEnabled()) {
- LOG.debug(
- "putBlock failed for blockID " + blockID + " with exception " + e
+ LOG.debug("putBlock failed for blockID {} with exception {}", blockID,
e
Review comment:
Just 1 character too long...
```suggestion
LOG.debug("putBlock failed for blockID {} with exception {}",
blockID, e
```
----------------------------------------------------------------
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]