hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen O'Malley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-54) SequenceFile should compress blocks, not individual entries
Date Fri, 11 Aug 2006 17:37:16 GMT
    [ http://issues.apache.org/jira/browse/HADOOP-54?page=comments#action_12427564 ] 
Owen O'Malley commented on HADOOP-54:

I have a couple of comments. I had more, but jira ate them.

(It really sucks that jira throws your comment away if your login times out. *sigh*)

1. The Writer class should have the unneeded compression stuff taken out.
2. The Writer.compressed and blockCompressed fields should be taken out and replaced with
3. The sync bytes in the block compressed writer should be written before the block rather
than after (except for the first block). The goal is to get them between blocks, you don't
really want one at the end (or beginning) of the file.
4. The CompressedBytes class should be private.
5. The private Writer constructor on line 307 is not used.
6. The static field VERSION_4 should be renamed to BLOCK_COMPRESS_VERSION and it should be
marked final.
7. I'd rename the "byte[] version" to "syncBlock" and make a new field "byte version" that
will contain just the last byte, which is the file version.
8. We really need to move to the Text class instead of UTF8. This has a couple of changes:
  A.  in writeFileHeader, the "new UTF8(...).write(out);" should be "Text.writeString(out,
  B. in init, reading the class names strings is the reverse: keyClass = Text.readString(in);
  C. we have to support the UTF8 string encodings for old file versions, so you'll need to
switch behavior based on the version we are reading.

> 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.6.0
>         Attachments: SequenceFiles.patch, VIntCompressionResults.txt
> 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