Huginn-kio commented on PR #8661: URL: https://github.com/apache/hbase/pull/8661#issuecomment-5795242812
> The name of the property here is "onDiskDataSizeWithHeader" so it should record the proper block size on disk. If we apply this change, we won't be recording the actual block size on disk. Thanks for pointing this out. The field name can indeed be misleading. According to the HFile block header contract, `onDiskSizeWithoutHeader` represents the physical on-disk data size including trailing checksums, while `onDiskDataSizeWithHeader` represents the header plus on-disk data excluding checksums. `Writer#getBlockForCaching()` uses `cloneOnDiskBufferWithHeader()`, whose buffer contains only the header and on-disk data. Therefore, the intended value for this cache-only block is `onDiskBlockBytesWithHeader.size()`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
