Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-16003 Compacting memstore related fixes
  3. HBASE-16229

Cleaning up size and heapSize calculation

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • None
    • None
    • Reviewed

    Description

      It is bit ugly now. For eg:
      AbstractMemStore

      public final static long FIXED_OVERHEAD = ClassSize.align(
            ClassSize.OBJECT +
                (4 * ClassSize.REFERENCE) +
                (2 * Bytes.SIZEOF_LONG));
      
        public final static long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD +
            (ClassSize.ATOMIC_LONG + ClassSize.TIMERANGE_TRACKER +
            ClassSize.CELL_SKIPLIST_SET + ClassSize.CONCURRENT_SKIPLISTMAP));
      

      We include the heap overhead of Segment also here. It will be better the Segment contains its overhead part and the Memstore impl uses the heap size of all of its segments to calculate its size.
      Also this

      public long heapSize() {
          return getActive().getSize();
        }
      

      HeapSize to consider all segment's size not just active's. I am not able to see an override method in CompactingMemstore.

      This jira tries to solve some of these.
      When we create a Segment, we seems pass some initial heap size value to it. Why? The segment object internally has to know what is its heap size not like some one else dictate it.

      More to add when doing this cleanup

      Attachments

        1. HBASE-16229.patch
          48 kB
          Anoop Sam John
        2. HBASE-16229_V2.patch
          48 kB
          Anoop Sam John
        3. HBASE-16229_V3.patch
          58 kB
          Anoop Sam John
        4. HBASE-16229_V4.patch
          72 kB
          Anoop Sam John
        5. HBASE-16229_V5.patch
          77 kB
          Anoop Sam John
        6. HBASE-16229_V5.patch
          78 kB
          Anoop Sam John
        7. HBASE-16229_V6.patch
          83 kB
          Anoop Sam John

        Activity

          People

            anoop.hbase Anoop Sam John
            anoop.hbase Anoop Sam John
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: