[
https://issues.apache.org/jira/browse/HBASE-23047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16933286#comment-16933286
]
Peter Somogyi commented on HBASE-23047:
---------------------------------------
+1
{quote}Should we review checkstyle rules accordingly, then?
{quote}
I think both 2 and 4 spaces are allowed. I didn't want to have mixed 2 and 4
spaces in the first patch for the same command.
> 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,
> HBASE-23047.master.002.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)