You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Mohit Anchlia <mo...@gmail.com> on 2012/06/26 00:25:59 UTC

How to find compression codec

Is there a way to look at the sequence file or a block report to see which
compression is being used?

Re: How to find compression codec

Posted by Harsh J <ha...@cloudera.com>.
The codec classname is serialized into a sequence file itself.

You can detect the codec of a SequenceFile, using its Reader:
http://hadoop.apache.org/common/docs/r0.20.2/api/org/apache/hadoop/io/SequenceFile.Reader.html#getCompressionCodec()

Or non-programmatically by viewing the header of the file (cat first
hundred bytes or so), and finding the pattern
"org.apache.hadoop.io.compress" in the stream printed.

On Tue, Jun 26, 2012 at 3:55 AM, Mohit Anchlia <mo...@gmail.com> wrote:
> Is there a way to look at the sequence file or a block report to see which
> compression is being used?



-- 
Harsh J