This is an automated email from the ASF dual-hosted git repository.

wchevreuil pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new a85c6b4  HBASE-23047 ChecksumUtil.validateChecksum logs an INFO 
message inside a "if(LOG.isTraceEnabled())" block.
a85c6b4 is described below

commit a85c6b48672552136ead76a682458c884a558dc2
Author: Wellington Chevreuil <[email protected]>
AuthorDate: Thu Sep 19 15:31:47 2019 +0100

    HBASE-23047 ChecksumUtil.validateChecksum logs an INFO message inside a 
"if(LOG.isTraceEnabled())" block.
    
    Signed-off-by: Peter Somogyi <[email protected]>
---
 .../java/org/apache/hadoop/hbase/io/hfile/ChecksumUtil.java    | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ChecksumUtil.java 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ChecksumUtil.java
index dc007f7..f2f9d58 100644
--- 
a/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ChecksumUtil.java
+++ 
b/hbase-server/src/main/java/org/apache/hadoop/hbase/io/hfile/ChecksumUtil.java
@@ -180,12 +180,10 @@ public class ChecksumUtil {
         DataChecksum.newDataChecksum(ctype.getDataChecksumType(), 
bytesPerChecksum);
     assert dataChecksum != null;
     int onDiskDataSizeWithHeader =
-        buf.getInt(HFileBlock.Header.ON_DISK_DATA_SIZE_WITH_HEADER_INDEX);
-    if (LOG.isTraceEnabled()) {
-      LOG.info("dataLength=" + buf.capacity() + ", sizeWithHeader=" + 
onDiskDataSizeWithHeader
-          + ", checksumType=" + ctype.getName() + ", file=" + pathName + ", 
offset=" + offset
-          + ", headerSize=" + hdrSize + ", bytesPerChecksum=" + 
bytesPerChecksum);
-    }
+      buf.getInt(HFileBlock.Header.ON_DISK_DATA_SIZE_WITH_HEADER_INDEX);
+    LOG.trace("dataLength={}, sizeWithHeader={}, checksumType={}, file={}, "
+      + "offset={}, headerSize={}, bytesPerChecksum={}", buf.capacity(), 
onDiskDataSizeWithHeader,
+      ctype.getName(), pathName, offset, hdrSize, bytesPerChecksum);
     ByteBuff data = 
buf.duplicate().position(0).limit(onDiskDataSizeWithHeader);
     ByteBuff checksums = 
buf.duplicate().position(onDiskDataSizeWithHeader).limit(buf.limit());
     return verifyChunkedSums(dataChecksum, data, checksums, pathName);

Reply via email to