[ 
https://issues.apache.org/jira/browse/HADOOP-4918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664184#action_12664184
 ] 

Doug Cutting commented on HADOOP-4918:
--------------------------------------

> BZip2Codec does not work with SequenceFile right now in 0.19.  I consider 
> that to be a bug.

The standard criteria is whether it is a regression.  Did it work in a release 
prior to 0.19?  If so, then it's a regression and should be fixed in 0.19.  If 
not then it's a new feature, and should be added in 0.20.

However sometimes, as an exception, we permit fixes to all-new code, e.g., a 
new contrib module, that are not regressions, if they have zero chance of 
causing a regression anywhere else.  This patch touches only files that were 
added in 0.19, and those files were themselves an independent addition 
(http://svn.apache.org/viewvc?view=rev&revision=680802), so I see no 
possibility for this creating any regressions in 0.19 and would not oppose 
treating it as such an exception.


> Fix bzip2 work with SequenceFile
> --------------------------------
>
>                 Key: HADOOP-4918
>                 URL: https://issues.apache.org/jira/browse/HADOOP-4918
>             Project: Hadoop Core
>          Issue Type: Bug
>          Components: io
>    Affects Versions: 0.19.0, 0.20.0, 0.21.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>             Fix For: 0.19.1, 0.20.0, 0.21.0
>
>         Attachments: HADOOP-4918.3.0.19.patch, HADOOP-4918.3.0.20.patch, 
> HADOOP-4918.3.patch
>
>
> Somehow bzip2 does not work with SequenceFile:
> {code}
>     String codec = "org.apache.hadoop.io.compress.BZip2Codec";
>     SequenceFile.Writer writer = SequenceFile.createWriter(fs, conf, new 
> Path(output), 
>         reader.getKeyClass(), reader.getValueClass(), CompressionType.BLOCK, 
>         (CompressionCodec)Class.forName(codec).newInstance());
> {code}
> The stack trace is here:
> {noformat}
> java.lang.UnsupportedOperationException
>         at 
> org.apache.hadoop.io.compress.BZip2Codec.getCompressorType(BZip2Codec.java:80)
>         at 
> org.apache.hadoop.io.compress.CodecPool.getCompressor(CodecPool.java:98)
>         at 
> org.apache.hadoop.io.SequenceFile$Writer.init(SequenceFile.java:914)
>         at 
> org.apache.hadoop.io.SequenceFile$BlockCompressWriter.<init>(SequenceFile.java:1198)
>         at 
> org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java:401)
>         at 
> org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java:329)
>         at 
> org.apache.hadoop.mapred.TestSequenceFileBZip.main(TestSequenceFileBZip.java:43)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>         at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at org.apache.hadoop.util.RunJar.main(RunJar.java:165)
>         at org.apache.hadoop.mapred.JobShell.run(JobShell.java:54)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
>         at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:79)
>         at org.apache.hadoop.mapred.JobShell.main(JobShell.java:68)
> {noformat}

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

Reply via email to