hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7371) Blocksize in TestHFileBlock is unintentionally small
Date Sat, 05 Jan 2013 00:45:03 GMT

    [ https://issues.apache.org/jira/browse/HBASE-7371?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13544472#comment-13544472
] 

Hudson commented on HBASE-7371:
-------------------------------

Integrated in HBase-0.94-security-on-Hadoop-23 #10 (See [https://builds.apache.org/job/HBase-0.94-security-on-Hadoop-23/10/])
    HBASE-7371 Blocksize in TestHFileBlock is unintentionally small (Revision 1423284)

     Result = FAILURE
larsh : 
Files : 
* /hbase/branches/0.94/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFileBlock.java

                
> 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