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);
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);