You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Zheng Wang (Jira)" <ji...@apache.org> on 2019/11/06 11:31:00 UTC

[jira] [Updated] (HBASE-23264) Resolve a TODO of BucketAllocator: "Why we add the extra 1024 bytes? Slop?"

     [ https://issues.apache.org/jira/browse/HBASE-23264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zheng Wang updated HBASE-23264:
-------------------------------
    Description: 
{code:java}
// TODO: Why we add the extra 1024 bytes? Slop?
private static final int DEFAULT_BUCKET_SIZES[] = { 4 * 1024 + 1024, 8 * 1024 + 1024,
 16 * 1024 + 1024, 32 * 1024 + 1024, 40 * 1024 + 1024, 48 * 1024 + 1024,
 56 * 1024 + 1024, 64 * 1024 + 1024, 96 * 1024 + 1024, 128 * 1024 + 1024,
 192 * 1024 + 1024, 256 * 1024 + 1024, 384 * 1024 + 1024,
 512 * 1024 + 1024 };{code}
The real block size in hfile may a little larger than the size we configured ,so we need add extra 1024 bytes for fit.

  was:
{code:java}
// TODO: Why we add the extra 1024 bytes? Slop?
private static final int DEFAULT_BUCKET_SIZES[] = { 4 * 1024 + 1024, 8 * 1024 + 1024,
 16 * 1024 + 1024, 32 * 1024 + 1024, 40 * 1024 + 1024, 48 * 1024 + 1024,
 56 * 1024 + 1024, 64 * 1024 + 1024, 96 * 1024 + 1024, 128 * 1024 + 1024,
 192 * 1024 + 1024, 256 * 1024 + 1024, 384 * 1024 + 1024,
 512 * 1024 + 1024 };{code}
The real block size in hile may exceed a little than the size we configed ,so we need add extra 1024 bytes for fit.


> Resolve a TODO of BucketAllocator: "Why we add the extra 1024 bytes? Slop?"
> ---------------------------------------------------------------------------
>
>                 Key: HBASE-23264
>                 URL: https://issues.apache.org/jira/browse/HBASE-23264
>             Project: HBase
>          Issue Type: Improvement
>          Components: BucketCache
>            Reporter: Zheng Wang
>            Assignee: Zheng Wang
>            Priority: Minor
>
> {code:java}
> // TODO: Why we add the extra 1024 bytes? Slop?
> private static final int DEFAULT_BUCKET_SIZES[] = { 4 * 1024 + 1024, 8 * 1024 + 1024,
>  16 * 1024 + 1024, 32 * 1024 + 1024, 40 * 1024 + 1024, 48 * 1024 + 1024,
>  56 * 1024 + 1024, 64 * 1024 + 1024, 96 * 1024 + 1024, 128 * 1024 + 1024,
>  192 * 1024 + 1024, 256 * 1024 + 1024, 384 * 1024 + 1024,
>  512 * 1024 + 1024 };{code}
> The real block size in hfile may a little larger than the size we configured ,so we need add extra 1024 bytes for fit.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)