[ 
http://issues.apache.org/jira/browse/HADOOP-54?page=comments#action_12428786 ] 
            
Doug Cutting commented on HADOOP-54:
------------------------------------

I am not convinced we want folks to encourage folks to add new 
SequenceFile.Writer subclasses.  Thus we should change the (new) protected 
fields to package private.  This will also simplify the javadoc.  I'd also 
prefer that these subclasses were not public either, making everyone use the 
factory.  This would expose far less of the implementation and further simplify 
the javadoc.  Owen has disputed this earlier.  Owen?

I note that when you updated uses of SequenceFile.Writer you consistently used 
the factory in favor of explicitly constructing the subclasses.  Thanks!  That 
makes hiding the subclasses easy.  We can always make them public later, if 
needed, but, once they're public, it is hard to remove them.  If we think the 
factory method has too many confusing parameters, then we could use a typesafe 
enumeration, e.g. something like:

writer = SequenceFile.createWriter(fs, conf, path, Compress.BLOCK);


> 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.final.patch, 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

        

Reply via email to