hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Lars Hofhansl (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (HBASE-7371) Blocksize in TestHFileBlock is unintentionally small
Date Tue, 18 Dec 2012 06:26:16 GMT

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

Lars Hofhansl resolved HBASE-7371.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 0.94.4
                   0.96.0
     Hadoop Flags: Reviewed

Committed to 0.94 and 0.96.
Thanks Enis.
                
> Blocksize in TestHFileBlock is unintentionally small
> ----------------------------------------------------
>
>                 Key: HBASE-7371
>                 URL: https://issues.apache.org/jira/browse/HBASE-7371
>             Project: HBase
>          Issue Type: Sub-task
>            Reporter: Lars Hofhansl
>            Assignee: Lars Hofhansl
>            Priority: Minor
>             Fix For: 0.96.0, 0.94.4
>
>
> Looking at TestHFileBlock.writeBlocks I see this:
> {code}
>       for (int j = 0; j < rand.nextInt(500); ++j) {
>         // This might compress well.
>         dos.writeShort(i + 1);
>         dos.writeInt(j + 1);
>       }
> {code}
> The result is probably not what the author intended. {{rand.nextInt(500)}} is evaluated
during each iterations and that leads to very small blocks size mostly between ~100 and 300
bytes or so.
> The author probably intended this:
> {code}
>       int size = rand.nextInt(500);
>       for (int j = 0; j < size; ++j) {
>         // This might compress well.
>         dos.writeShort(i + 1);
>         dos.writeInt(j + 1);
>       }
> {code}
> This leads to more reasonable block sizes between ~200 and 3000 bytes

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message