hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Arun C Murthy (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HADOOP-54) SequenceFile should compress blocks, not individual entries
Date Wed, 16 Aug 2006 10:40:16 GMT
     [ http://issues.apache.org/jira/browse/HADOOP-54?page=all ]

Arun C Murthy updated HADOOP-54:

    Attachment: SequenceFilesII.patch

Owen, appreciate your time... 

Responses inline:

> 1. The Writer class should have the unneeded compression stuff taken out.
> 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.
> 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.

All done and incorporated into latest patch.

> 2. The Writer.compressed and blockCompressed fields should be taken out and replaced
with methods.

Not clear - let's discuss this.

> 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.

I don't agree about renaming it to 'syncBlock' since it isn't a sync block. I don't mind doing
the "byte version" field, but the advantages aren't very clear.


I've attached a new patch (SequenceFilesII.patch) which incorporates Owen's suggestions and
also fixes the fallout of the latest SequenceFile in other parts of MR universe.

Also, I've a first cut of the SequenceFile Formats' documentation up:

> 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, SequenceFilesII.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