[ 
https://issues.apache.org/jira/browse/HBASE-23047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933193#comment-16933193
 ] 

Wellington Chevreuil commented on HBASE-23047:
----------------------------------------------

[~psomogyi], I can do it, but it seems compliant with our checkstyle rules. 
Should we review checkstyle rules accordingly, then?

> ChecksumUtil.validateChecksum logs an INFO message inside a 
> "if(LOG.isTraceEnabled())" block.
> ---------------------------------------------------------------------------------------------
>
>                 Key: HBASE-23047
>                 URL: https://issues.apache.org/jira/browse/HBASE-23047
>             Project: HBase
>          Issue Type: Improvement
>    Affects Versions: 3.0.0, 2.3.0, 2.2.1, 2.1.6
>            Reporter: Wellington Chevreuil
>            Assignee: Wellington Chevreuil
>            Priority: Minor
>         Attachments: HBASE-23047.master.001.patch
>
>
> Noticed this while analysing another potential checksum issue. Despite doing 
> a check for TRACE level, we log an INFO message inside the if block:
> {noformat}
> if (LOG.isTraceEnabled()) {
>       LOG.info("dataLength=" + buf.capacity() + ", sizeWithHeader=" + 
> onDiskDataSizeWithHeader
>           + ", checksumType=" + ctype.getName() + ", file=" + pathName + ", 
> offset=" + offset
>           + ", headerSize=" + hdrSize + ", bytesPerChecksum=" + 
> bytesPerChecksum);
>     }
> {noformat}
> Uploading a patch that logs a TRACE message and switch to parameterising 
> logging. Since there's no extra computation on the param passing, we 
> shouldn't need the extra if either.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to