You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by wc...@apache.org on 2019/09/19 14:35:31 UTC

[hbase] branch branch-2 updated: HBASE-23047 ChecksumUtil.validateChecksum logs an INFO message inside a "if(LOG.isTraceEnabled())" block.

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

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


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

commit fc4fa46d8e59f223ff997482d3653db03da8ebb2
Author: Wellington Chevreuil <wc...@apache.org>
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 <ps...@apache.org>
    (cherry picked from commit a85c6b48672552136ead76a682458c884a558dc2)
---
 .../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);