HBASE-23047 ChecksumUtil.validateChecksum logs an INFO message inside a "if(LOG.isTraceEnabled())" block.

Signed-off-by: Peter Somogyi <psomogyi@apache.org>
This commit is contained in:
Wellington Chevreuil 2019-09-19 15:31:47 +01:00
parent db0049558e
commit a85c6b4867
1 changed files with 4 additions and 6 deletions

View File

@ -180,12 +180,10 @@ public class ChecksumUtil {
DataChecksum.newDataChecksum(ctype.getDataChecksumType(), bytesPerChecksum); DataChecksum.newDataChecksum(ctype.getDataChecksumType(), bytesPerChecksum);
assert dataChecksum != null; assert dataChecksum != null;
int onDiskDataSizeWithHeader = int onDiskDataSizeWithHeader =
buf.getInt(HFileBlock.Header.ON_DISK_DATA_SIZE_WITH_HEADER_INDEX); buf.getInt(HFileBlock.Header.ON_DISK_DATA_SIZE_WITH_HEADER_INDEX);
if (LOG.isTraceEnabled()) { LOG.trace("dataLength={}, sizeWithHeader={}, checksumType={}, file={}, "
LOG.info("dataLength=" + buf.capacity() + ", sizeWithHeader=" + onDiskDataSizeWithHeader + "offset={}, headerSize={}, bytesPerChecksum={}", buf.capacity(), onDiskDataSizeWithHeader,
+ ", checksumType=" + ctype.getName() + ", file=" + pathName + ", offset=" + offset ctype.getName(), pathName, offset, hdrSize, bytesPerChecksum);
+ ", headerSize=" + hdrSize + ", bytesPerChecksum=" + bytesPerChecksum);
}
ByteBuff data = buf.duplicate().position(0).limit(onDiskDataSizeWithHeader); ByteBuff data = buf.duplicate().position(0).limit(onDiskDataSizeWithHeader);
ByteBuff checksums = buf.duplicate().position(onDiskDataSizeWithHeader).limit(buf.limit()); ByteBuff checksums = buf.duplicate().position(onDiskDataSizeWithHeader).limit(buf.limit());
return verifyChunkedSums(dataChecksum, data, checksums, pathName); return verifyChunkedSums(dataChecksum, data, checksums, pathName);