hadoop-ozone-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop-ozone] xiaoyuyao commented on a change in pull request #234: HDDS-2531. Sonar : remove duplicate string literals in BlockOutputStream
Date Wed, 04 Dec 2019 20:02:35 GMT
xiaoyuyao 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_r353954352
 
 

 ##########
 File path: hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/storage/BlockOutputStream.java
 ##########
 @@ -609,11 +603,8 @@ private void writeChunkToContainer(ChunkBuffer chunk) throws IOException
{
         }
         return e;
       }, responseExecutor).exceptionally(e -> {
-        if (LOG.isDebugEnabled()) {
-          LOG.debug(
-              "writing chunk failed " + chunkInfo.getChunkName() + " blockID "
-                  + blockID + " with exception " + e.getLocalizedMessage());
-        }
+        LOG.debug("writing chunk failed {} blockID {} with exception {}",
 
 Review comment:
   This is part of the I/O path where we have seen perf issue without the if (LOG.isDebugEnabled()),
which slf4j claim that parameterize log will solve. So my suggestion is to keep the  if (LOG.isDebugEnabled())
and ignore the Sonar warning if any here. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


Mime
View raw message