You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "deepankar (JIRA)" <ji...@apache.org> on 2016/02/29 23:05:18 UTC
[jira] [Created] (HBASE-15361) Remove unnecessary or Document
constraints on BucketCache possible bucket sizes
deepankar created HBASE-15361:
---------------------------------
Summary: Remove unnecessary or Document constraints on BucketCache possible bucket sizes
Key: HBASE-15361
URL: https://issues.apache.org/jira/browse/HBASE-15361
Project: HBase
Issue Type: Sub-task
Components: BucketCache
Reporter: deepankar
Priority: Minor
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
{code}
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);
}
{code}
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.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)