[ https://issues.apache.org/jira/browse/HBASE-17896?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962609#comment-15962609 ]
Chia-Ping Tsai commented on HBASE-17896: ---------------------------------------- {noformat} - assertEquals(ClassSize.OBJECT + 4, ClassSize.ARRAY); + if (ClassSize.useUnsafeLayout()) { + assertEquals(ClassSize.OBJECT + 4, ClassSize.ARRAY); + } else { + assertEquals(ClassSize.OBJECT + 8, ClassSize.ARRAY); + } {noformat} The fix is to avoid the test failure when running test without unsafe, because the UnsafeLayout and MemoryLayout return the different size of OBJECT/ARRAY. bq. and relatively, we should update the test case in TestHeapSize Nice catch. I will address your comment. Thanks for your reviews. [~carp84] > The FIXED_OVERHEAD of Segment is incorrect > ------------------------------------------ > > Key: HBASE-17896 > URL: https://issues.apache.org/jira/browse/HBASE-17896 > Project: HBase > Issue Type: Sub-task > Affects Versions: 2.0.0 > Reporter: Chia-Ping Tsai > Assignee: Chia-Ping Tsai > Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-17896.v0.patch > > > {noformat} > 5 * ClassSize.REFERENCE // cellSet, comparator, memStoreLAB, size, > timeRangeTracker > {noformat} > In fact, the Segment has 6 references. > # cellSet > # comparator > # memStoreLAB > # dataSize > # heapSize > # timeRangeTracker -- This message was sent by Atlassian JIRA (v6.3.15#6346)