What's the best way to check the compression codec that an HDFS file was
written with?

We use both Gzip and Snappy compression so I want a way to determine how a
specific file is compressed.

The closest I found is the *getCodec
<http://hadoop.apache.org/docs/current/api/org/apache/hadoop/io/compress/CompressionCodecFactory.html#getCodec(org.apache.hadoop.fs.Path)>
*but
that relies on the file name suffix ... which don't exist since Reducers
typically don't add a suffix to the filenames they create.

Thanks

Reply via email to