Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-15240 Go Big BucketCache Fixes
  3. HBASE-15361

Remove unnecessary or Document constraints on BucketCache possible bucket sizes

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • None
    • BucketCache
    • None

    Description

      When we were trying to tune the bucket sizes hbase.bucketcache.bucket.sizes according to our workload, we encountered an issue due to the way offset is stored in the bucket entry. We divide the offset into integer base and byte value and it assumes that all bucket offsets will be a multiple of 256 (left shifting by 8). See the code below

          long offset() { // Java has no unsigned numbers
            long o = ((long) offsetBase) & 0xFFFFFFFF;
            o += (((long) (offset1)) & 0xFF) << 32;
            return o << 8;
          }
      
          private void setOffset(long value) {
            assert (value & 0xFF) == 0;
            value >>= 8;
            offsetBase = (int) value;
            offset1 = (byte) (value >> 32);
          }
      

      This was there to save 3 bytes per BucketEntry instead of using long and when there are no other fields in the Bucket Entry, but now there are lot of fields in the bucket entry , This not documented so we could either document the constraint that it should be a strict 256 bytes multiple of just go away with this constraint.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              dvdreddy deepankar
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: