You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Sachin Sudarshana <sa...@gmail.com> on 2013/06/09 11:29:33 UTC

Compression in Hive using different file formats

Hi,

I was testing Compression in Hive using different file formats.

I have a table stored as a sequence file ,* facts_normal_seq*.

Now I wish to create another table *facts_snappy_seq *by using Snappy
compression codec.

Is this the correct way to do this:

*CREATE TABLE facts_snappy_seq (<column1> , <column2> ....) ROW FORMAT....
STORED AS SEQUENCEFILE;*
*
*
*SET hive.exec.compress.output=true;*
*SET
mapred.output.compression.codec=org.apache.hadoop.io.compress.SnappyCodec;*
*SET mapred.output.compression.type=BLOCK; *
*
*
*INSERT OVERWRITE TABLE facts_snappy_seq SELECT * FROM facts_normal_seq;*
*
*
When i populate the table in this manner, the file in HDFS doesn not seem
to have the .snappy extension.

Any pointers in this regard would really be helpful

Thank you,
Sachin