You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Techy Teck <co...@gmail.com> on 2012/08/03 03:55:17 UTC

decompress the file that has been compressed in LzoCodec format

I am using the below command to compress the output in *Block
Compression*and I have created my table as a
*SequenceFile*


*set mapred.output.compress=true;*

*set mapred.output.compression.type=BLOCK;*

*set mapred.output.compression.codec=org.apache.hadoop.io.compress.LzoCodec;
*


So after the query is done, when I do *ls*, I see the below file. But when
I try to open this file using *hadoop fs -cat, *I see some weird characters
in that file, but I can also see my output too. So before viewing this
file, I need to decompress it in any format and then I need to do the cat?
If yes, then how should I decompress this file?


*/apps/hdmi/ldata/dt=20120709/attempt_201207311206_11141_r_000000_0*

Re: decompress the file that has been compressed in LzoCodec format

Posted by Techy Teck <co...@gmail.com>.
Thanks Bejoy. That worked.

On Fri, Aug 3, 2012 at 12:05 AM, Bejoy Ks <be...@yahoo.com> wrote:

> Hi Techy
>
> Try using hadoop fs -text <full path of file in hdfs>
>
> That should give the output in some readable format.
>
> Regards,
> Bejoy KS
>
>   ------------------------------
> *From:* Techy Teck <co...@gmail.com>
> *To:* user@hive.apache.org
> *Sent:* Friday, August 3, 2012 7:25 AM
> *Subject:* decompress the file that has been compressed in LzoCodec format
>
> I am using the below command to compress the output in *Block Compression*and I have created my table as a
> *SequenceFile*
>
> *set mapred.output.compress=true;*
> *set mapred.output.compression.type=BLOCK;*
> *set
> mapred.output.compression.codec=org.apache.hadoop.io.compress.LzoCodec;*
>
> So after the query is done, when I do *ls*, I see the below file. But
> when I try to open this file using *hadoop fs -cat, *I see some weird
> characters in that file, but I can also see my output too. So before
> viewing this file, I need to decompress it in any format and then I need to
> do the cat? If yes, then how should I decompress this file?
>
> */apps/hdmi/ldata/dt=20120709/attempt_201207311206_11141_r_000000_0*
>
>
>

Re: decompress the file that has been compressed in LzoCodec format

Posted by Bejoy Ks <be...@yahoo.com>.
Hi Techy

Try using hadoop fs -text <full path of file in hdfs>

That should give the output in some readable format.
 
Regards,
Bejoy KS


________________________________
 From: Techy Teck <co...@gmail.com>
To: user@hive.apache.org 
Sent: Friday, August 3, 2012 7:25 AM
Subject: decompress the file that has been compressed in LzoCodec format
 

I am using the below command to compress the output in Block Compression and I have created my table as a SequenceFile

set mapred.output.compress=true;
set mapred.output.compression.type=BLOCK;
set
mapred.output.compression.codec=org.apache.hadoop.io.compress.LzoCodec;

So after the query is done, when I do ls, I see the below file. But when I try to open this file using hadoop fs -cat, I see some weird characters in that file, but I can also see my output too. So before viewing this file, I need to decompress it in any format and then I need to do the cat? If yes, then how should I decompress this file?

/apps/hdmi/ldata/dt=20120709/attempt_201207311206_11141_r_000000_0