saintstack commented on a change in pull request #2018:
URL: https://github.com/apache/hbase/pull/2018#discussion_r466701236



##########
File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileContext.java
##########
@@ -37,13 +37,7 @@
  */
 @InterfaceAudience.Private
 public class HFileContext implements HeapSize, Cloneable {
-  public static final int FIXED_OVERHEAD = ClassSize.align(ClassSize.OBJECT +
-      // 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);
+  public static final long FIXED_OVERHEAD = 
ClassSize.estimateBase(HFileContext.class, false);

Review comment:
       Or, sorry, yeah, FIXED_OVERHEAD is 'this' classes size; i.e. the shallow 
size (I think).

##########
File path: 
hbase-common/src/main/java/org/apache/hadoop/hbase/io/hfile/HFileContext.java
##########
@@ -37,13 +37,7 @@
  */
 @InterfaceAudience.Private
 public class HFileContext implements HeapSize, Cloneable {
-  public static final int FIXED_OVERHEAD = ClassSize.align(ClassSize.OBJECT +
-      // 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);
+  public static final long FIXED_OVERHEAD = 
ClassSize.estimateBase(HFileContext.class, false);

Review comment:
       I went back through history of ClassSize... its so old.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to