You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Doug Cutting (JIRA)" <ji...@apache.org> on 2007/01/25 23:24:49 UTC

[jira] Commented: (HADOOP-938) too many SequenceFile.createWriter() methods

    [ https://issues.apache.org/jira/browse/HADOOP-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12467663 ] 

Doug Cutting commented on HADOOP-938:
-------------------------------------

I can think of a couple of ways to implement this:

1. Put options in a Configuration:

Configuration options = new Configuration(defaults);
SequenceFile.setCompressionType(options, Compress.BLOCK);
SequenceFile.Writer writer = SequenceFile.createWriter(options, path);

This would require making the Configuration constructor lighter weight.

2. Put options in a new parameter class:

SequenceFile.Options options = new SequenceFile.Options(defaults);
options.setCompressionType(options, Compress.BLOCK);
SequenceFile.Writer writer = SequenceFile.createWriter(options, path);

Thoughts?


> too many SequenceFile.createWriter() methods
> --------------------------------------------
>
>                 Key: HADOOP-938
>                 URL: https://issues.apache.org/jira/browse/HADOOP-938
>             Project: Hadoop
>          Issue Type: Improvement
>            Reporter: Doug Cutting
>
> There are too many SequenceFile.createWriter() method signatures.  This method has two required paramters: a Configuration and a Path.  It has one obsolete parameter: a FileSystem.  And it has five optional parameters: CompressionType, CompressionCodec, Progress, replication, and metadata.
> We should remove the obsolete parameter and make all optional parameters into setters.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.