[ https://issues.apache.org/jira/browse/HADOOP-4918?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12664009#action_12664009 ]
Abdul Qadeer commented on HADOOP-4918: -------------------------------------- Zheng, I went through all of your BZip2 related changes to my previous BZip2Codec code and they are looking fine to me. so a +1 as far as BZip2 related stuff is concerned. You just uploaded a new patch for 0.19 branch. Why we need different patches for different branches? > Make bzip2 work with SequenceFile > --------------------------------- > > Key: HADOOP-4918 > URL: https://issues.apache.org/jira/browse/HADOOP-4918 > Project: Hadoop Core > Issue Type: Improvement > Components: mapred > Reporter: Zheng Shao > Assignee: Zheng Shao > Fix For: 0.21.0 > > Attachments: HADOOP-4918.3.0.19.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.