liuml07 commented on a change in pull request #822: HBASE-23288 - Backport
HBASE-23251 (Add Column Family and Table Names…
URL: https://github.com/apache/hbase/pull/822#discussion_r346523985
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileContext.java
##########
@@ -203,11 +218,18 @@ public String getHFileName() {
public long heapSize() {
long size = ClassSize.align(ClassSize.OBJECT +
// Algorithm reference, encodingon, checksumtype, Encryption.Context
reference
- 5 * ClassSize.REFERENCE +
+ 7 * ClassSize.REFERENCE +
Review comment:
Thanks @gjacoby126 I guess my comment is more about format for easier review
and future change.
```
5 * ClassSize.REFERENCE +
2 * Bytes.SIZEOF_INT +
// usesHBaseChecksum, includesMvcc, includesTags and compressTags
4 * Bytes.SIZEOF_BOOLEAN +
Bytes.SIZEOF_LONG);
```
is changed to
```
7 * ClassSize.REFERENCE +
2 * Bytes.SIZEOF_INT +
// usesHBaseChecksum, includesMvcc, includesTags and compressTags
4 * Bytes.SIZEOF_BOOLEAN +
2 * ClassSize.ARRAY +
Bytes.SIZEOF_LONG);
```
Instead, I think it's better to have the same expression as `master` branch.
```
// Algorithm, checksumType, encoding, Encryption.Context, hfileName
reference,
5 * ClassSize.REFERENCE + 2 * Bytes.SIZEOF_INT +
// usesHBaseChecksum, includesMvcc, includesTags and compressTags
4 * Bytes.SIZEOF_BOOLEAN + Bytes.SIZEOF_LONG +
//byte[] headers for column family and table name
2 * ClassSize.ARRAY + 2 * ClassSize.REFERENCE);
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services