You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Kishore kumar <ki...@techdigita.in> on 2014/04/22 17:02:35 UTC

How to get hdfs zip files in localfilesystem

Hi Experts,

Hive query result stored in hdfs with 75 zip files, I merged them and get
into the local filesystem with '-getmerge', but I am unable to see the data
after i unzipped the file, anything i am missing ? please help me.

-- 


*Kishore *

Re: How to get hdfs zip files in localfilesystem

Posted by "Subramanian, Sanjay (HQP)" <sa...@roberthalf.com>.
This looks like the file has Ctrl A (default delimiter)

Try this

CTRLA=$(echo -e "\x01ā€); sed 's/'${CTRLA}'/\t/g’ TheCombinedResultOfTheJob.txt > TheCombinedResultOfTheJob.tsv; less TheCombinedResultOfTheJob.tsv

Thanks
Warm Regards

Sanjay

From: Kishore kumar <ki...@techdigita.in>>
Reply-To: "user@hive.apache.org<ma...@hive.apache.org>" <us...@hive.apache.org>>
Date: Tuesday, April 22, 2014 at 9:38 AM
To: "user@hive.apache.org<ma...@hive.apache.org>" <us...@hive.apache.org>>
Subject: Re: How to get hdfs zip files in localfilesystem

I am getting the message if i run below command to see the contents in merged file, please help how to do this, if I am storing the query result in local filesystem I can able to see the contents.

# less TheCombinedResultOfTheJob.txt

"TheCombinedResultOfTheJob.txt" may be a binary file.  See it anyway?  y   when i enter "y" the result is

0^A0^A0^A11^A0^A12^A416^A0.0
0^A0^A0^A11^A38^A12^A87^A0.0
0^A0^A0^A12^A53^A11^A1^A0.0
0^A0^A0^A12^A72^A11^A30^A0.0
0^A0^A0^A12^A357^A11^A12^A0.0
0^A0^A0^A12^A395^A11^A2^A0.0
0^A0^A0^A12^A547^A11^A9^A0.0



On Tue, Apr 22, 2014 at 8:32 PM, Kishore kumar <ki...@techdigita.in>> wrote:
Hi Experts,

Hive query result stored in hdfs with 75 zip files, I merged them and get into the local filesystem with '-getmerge', but I am unable to see the data after i unzipped the file, anything i am missing ? please help me.

--

Kishore





Re: How to get hdfs zip files in localfilesystem

Posted by Kishore kumar <ki...@techdigita.in>.
I am getting the message if i run below command to see the contents in
merged file, please help how to do this, if I am storing the query result
in local filesystem I can able to see the contents.

# less TheCombinedResultOfTheJob.txt

"TheCombinedResultOfTheJob.txt" may be a binary file.  See it anyway?  y
when i enter "y" the result is

0^A0^A0^A11^A0^A12^A416^A0.0
0^A0^A0^A11^A38^A12^A87^A0.0
0^A0^A0^A12^A53^A11^A1^A0.0
0^A0^A0^A12^A72^A11^A30^A0.0
0^A0^A0^A12^A357^A11^A12^A0.0
0^A0^A0^A12^A395^A11^A2^A0.0
0^A0^A0^A12^A547^A11^A9^A0.0



On Tue, Apr 22, 2014 at 8:32 PM, Kishore kumar <ki...@techdigita.in>wrote:

> Hi Experts,
>
> Hive query result stored in hdfs with 75 zip files, I merged them and get
> into the local filesystem with '-getmerge', but I am unable to see the data
> after i unzipped the file, anything i am missing ? please help me.
>
> --
>
>
> *Kishore *
>