hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "eric baldeschwieler (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-54) SequenceFile should compress blocks, not individual entries
Date Wed, 19 Jul 2006 16:30:15 GMT
    [ http://issues.apache.org/jira/browse/HADOOP-54?page=comments#action_12422183 ] 
eric baldeschwieler commented on HADOOP-54:

I think this is enough of an argument to return to a format with key lengths segregated though.
 We proposed interleaved because we thought it would be simpler to code.  Since it clearly
will not be, we might as sell segregate lengths.  This has the extra advantage that it will
compress better (because we will be grouping like data together).

I think this brings us full circle back to arun's original proposal (but all wiser).  So I'm
now proposing:

| sync-marker 
| numPairs (delta compressed int)
| KeyLenBlockCompressedLen (delta compressed int)
| KeyBlockCompressedLen  (delta compressed int)
| ValueLenBlockCompressedLen  (delta compressed int)
| ValueBlockCompressedLen  (delta compressed int)
| keyLengths... (gzipped & delta compressed)
| keys... (gzipped or custom compressed)
| valueLengths... (gzipped & delta compressed)
| values... (gzipped or custom compressed)

This will allow one to scan the keys and skip the values if desired.  It will yield pretty
good compression.  Its not that hard to understand if well documented...


I like arun's suggestion of considering the target block size the minimum.  That will keep
things simpler.

I suggest we proceed this way, unless anyone objects?

> SequenceFile should compress blocks, not individual entries
> -----------------------------------------------------------
>                 Key: HADOOP-54
>                 URL: http://issues.apache.org/jira/browse/HADOOP-54
>             Project: Hadoop
>          Issue Type: Improvement
>          Components: io
>    Affects Versions: 0.2.0
>            Reporter: Doug Cutting
>         Assigned To: Arun C Murthy
>             Fix For: 0.5.0
> SequenceFile will optionally compress individual values.  But both compression and performance
would be much better if sequences of keys and values are compressed together.  Sync marks
should only be placed between blocks.  This will require some changes to MapFile too, so that
all file positions stored there are the positions of blocks, not entries within blocks.  Probably
this can be accomplished by adding a getBlockStartPosition() method to SequenceFile.Writer.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message