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 Susanne Lehmann <su...@metamarketsgroup.com> on 2010/05/02 20:22:37 UTC
problem w/ data load
Hi,
I want to load data from HDFS to Hive, the data is in compressed files.
The data is stored in flat files, the delimiter is ^A (ctrl-A).
As long as I use de-compressed files everything is working fine. Since
ctrl-A is the default delimiter I even don't need a specification for
it. I do the following:
hadoop dfs -put /test/file new
hive> DROP TABLE test_new;
OK
Time taken: 0.057 seconds
hive> CREATE TABLE test_new(
> bla int,
> bla string,
> etc
> bla string);
OK
Time taken: 0.035 seconds
hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
Loading data to table test_new
OK
Time taken: 0.063 seconds
But if I do the same with the same file compressed it's not working
anymore. I tried tons of different table definitions with the
delimiter specified, but it doesn't go. The load itself works, but the
data is always NULL, so there is a delimiter problem I conclude.
Any help is greatly appreciated!
Re: problem w/ data load
Posted by Amr Awadallah <aa...@cloudera.com>.
yep, hive will work fine if you point it to the .gz file
just note though that if this is one large gz file then it will only use
one mapper and one reducer, it will not get parallelized.
-- amr
On 5/3/2010 11:29 AM, Edward Capriolo wrote:
> On Mon, May 3, 2010 at 2:00 PM, Susanne Lehmann<
> susanne.lehmann@metamarketsgroup.com> wrote:
>
>
>> Hi Tom,
>>
>> Yes. I store the file in HDFS with a .gz extension. Do i need to
>> "tell" somehow Hive that it is a compressed file?
>>
>> Best,
>> Susanne
>>
>> PS: Thanks for the tip with the list, I will use the other list for
>> further questions if necessary. I wasn't sure which one to use.
>>
>> On Mon, May 3, 2010 at 9:52 AM, Tom White<to...@cloudera.com> wrote:
>>
>>> Hi Susanne,
>>>
>>> Hadoop uses the file extension to detect that a file is compressed. I
>>> believe Hive does too. Did you store the compressed file in HDFS with
>>> a .gz extension?
>>>
>>> Cheers,
>>> Tom
>>>
>>> BTW It's best to send Hive questions like these to the hive-user@ list.
>>>
>>> On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann
>>> <su...@metamarketsgroup.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I want to load data from HDFS to Hive, the data is in compressed files.
>>>> The data is stored in flat files, the delimiter is ^A (ctrl-A).
>>>> As long as I use de-compressed files everything is working fine. Since
>>>> ctrl-A is the default delimiter I even don't need a specification for
>>>> it. I do the following:
>>>>
>>>>
>>>> hadoop dfs -put /test/file new
>>>>
>>>> hive> DROP TABLE test_new;
>>>> OK
>>>> Time taken: 0.057 seconds
>>>> hive> CREATE TABLE test_new(
>>>> > bla int,
>>>> > bla string,
>>>> > etc
>>>> > bla string);
>>>> OK
>>>> Time taken: 0.035 seconds
>>>> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
>>>> Loading data to table test_new
>>>> OK
>>>> Time taken: 0.063 seconds
>>>>
>>>> But if I do the same with the same file compressed it's not working
>>>> anymore. I tried tons of different table definitions with the
>>>> delimiter specified, but it doesn't go. The load itself works, but the
>>>> data is always NULL, so there is a delimiter problem I conclude.
>>>>
>>>> Any help is greatly appreciated!
>>>>
>>>>
>>>
>>
> If your file is a text file that is simply gzipped you create your table as
> normal
>
> create table XXXX stored as textfile.
>
> If your file is a sequence file using block compression (gzip) you
>
> create table XXXX stored as sequencefile.
>
>
Re: problem w/ data load
Posted by Edward Capriolo <ed...@gmail.com>.
On Mon, May 3, 2010 at 2:00 PM, Susanne Lehmann <
susanne.lehmann@metamarketsgroup.com> wrote:
> Hi Tom,
>
> Yes. I store the file in HDFS with a .gz extension. Do i need to
> "tell" somehow Hive that it is a compressed file?
>
> Best,
> Susanne
>
> PS: Thanks for the tip with the list, I will use the other list for
> further questions if necessary. I wasn't sure which one to use.
>
> On Mon, May 3, 2010 at 9:52 AM, Tom White <to...@cloudera.com> wrote:
> > Hi Susanne,
> >
> > Hadoop uses the file extension to detect that a file is compressed. I
> > believe Hive does too. Did you store the compressed file in HDFS with
> > a .gz extension?
> >
> > Cheers,
> > Tom
> >
> > BTW It's best to send Hive questions like these to the hive-user@ list.
> >
> > On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann
> > <su...@metamarketsgroup.com> wrote:
> >> Hi,
> >>
> >> I want to load data from HDFS to Hive, the data is in compressed files.
> >> The data is stored in flat files, the delimiter is ^A (ctrl-A).
> >> As long as I use de-compressed files everything is working fine. Since
> >> ctrl-A is the default delimiter I even don't need a specification for
> >> it. I do the following:
> >>
> >>
> >> hadoop dfs -put /test/file new
> >>
> >> hive> DROP TABLE test_new;
> >> OK
> >> Time taken: 0.057 seconds
> >> hive> CREATE TABLE test_new(
> >> > bla int,
> >> > bla string,
> >> > etc
> >> > bla string);
> >> OK
> >> Time taken: 0.035 seconds
> >> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
> >> Loading data to table test_new
> >> OK
> >> Time taken: 0.063 seconds
> >>
> >> But if I do the same with the same file compressed it's not working
> >> anymore. I tried tons of different table definitions with the
> >> delimiter specified, but it doesn't go. The load itself works, but the
> >> data is always NULL, so there is a delimiter problem I conclude.
> >>
> >> Any help is greatly appreciated!
> >>
> >
>
If your file is a text file that is simply gzipped you create your table as
normal
create table XXXX stored as textfile.
If your file is a sequence file using block compression (gzip) you
create table XXXX stored as sequencefile.
Re: problem w/ data load
Posted by Susanne Lehmann <su...@metamarketsgroup.com>.
Hi Tom,
Yes. I store the file in HDFS with a .gz extension. Do i need to
"tell" somehow Hive that it is a compressed file?
Best,
Susanne
PS: Thanks for the tip with the list, I will use the other list for
further questions if necessary. I wasn't sure which one to use.
On Mon, May 3, 2010 at 9:52 AM, Tom White <to...@cloudera.com> wrote:
> Hi Susanne,
>
> Hadoop uses the file extension to detect that a file is compressed. I
> believe Hive does too. Did you store the compressed file in HDFS with
> a .gz extension?
>
> Cheers,
> Tom
>
> BTW It's best to send Hive questions like these to the hive-user@ list.
>
> On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann
> <su...@metamarketsgroup.com> wrote:
>> Hi,
>>
>> I want to load data from HDFS to Hive, the data is in compressed files.
>> The data is stored in flat files, the delimiter is ^A (ctrl-A).
>> As long as I use de-compressed files everything is working fine. Since
>> ctrl-A is the default delimiter I even don't need a specification for
>> it. I do the following:
>>
>>
>> hadoop dfs -put /test/file new
>>
>> hive> DROP TABLE test_new;
>> OK
>> Time taken: 0.057 seconds
>> hive> CREATE TABLE test_new(
>> > bla int,
>> > bla string,
>> > etc
>> > bla string);
>> OK
>> Time taken: 0.035 seconds
>> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
>> Loading data to table test_new
>> OK
>> Time taken: 0.063 seconds
>>
>> But if I do the same with the same file compressed it's not working
>> anymore. I tried tons of different table definitions with the
>> delimiter specified, but it doesn't go. The load itself works, but the
>> data is always NULL, so there is a delimiter problem I conclude.
>>
>> Any help is greatly appreciated!
>>
>
Re: problem w/ data load
Posted by Tom White <to...@cloudera.com>.
Hi Susanne,
Hadoop uses the file extension to detect that a file is compressed. I
believe Hive does too. Did you store the compressed file in HDFS with
a .gz extension?
Cheers,
Tom
BTW It's best to send Hive questions like these to the hive-user@ list.
On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann
<su...@metamarketsgroup.com> wrote:
> Hi,
>
> I want to load data from HDFS to Hive, the data is in compressed files.
> The data is stored in flat files, the delimiter is ^A (ctrl-A).
> As long as I use de-compressed files everything is working fine. Since
> ctrl-A is the default delimiter I even don't need a specification for
> it. I do the following:
>
>
> hadoop dfs -put /test/file new
>
> hive> DROP TABLE test_new;
> OK
> Time taken: 0.057 seconds
> hive> CREATE TABLE test_new(
> > bla int,
> > bla string,
> > etc
> > bla string);
> OK
> Time taken: 0.035 seconds
> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
> Loading data to table test_new
> OK
> Time taken: 0.063 seconds
>
> But if I do the same with the same file compressed it's not working
> anymore. I tried tons of different table definitions with the
> delimiter specified, but it doesn't go. The load itself works, but the
> data is always NULL, so there is a delimiter problem I conclude.
>
> Any help is greatly appreciated!
>
Re: problem w/ data load
Posted by Ted Yu <yu...@gmail.com>.
Susanne:
I assume you have native libraries for GZIP installed.
Meaning you have no trouble reading GZIP files in normal map/reduce jobs.
On Sun, May 2, 2010 at 9:44 PM, Susanne Lehmann <
susanne.lehmann@metamarketsgroup.com> wrote:
> There is nothing in the logfile. (I copied it away before the load and
> there is no new entry created.) The only thing is, that the values in
> the table are not ok. That's how the output looks like:
>
> hive> select * from test_new limit 5;
> OK
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL
> NULL
> ����X��[$���TEw�#[RM�Z|�;<�;}\��Zt�J�w}�"�ʱ��hb�y�!�$����z}��x����Q��i������W�u�*��t~�]�_v|���vƏ��#n,�f����~�in�ouO�벜��gO�]�˲�\'���N0�-�]��_θ�9�ފ^h���F۱���nze���,��yI��.�4��R*�
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL
> NULL =�j$m��� ����R�:y�t� NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL NULL NULL NULL
> NULL NULL NULL NULL NULL NULL
> Time taken: 3.089 seconds
>
>
>
>
>
>
> On Sun, May 2, 2010 at 7:22 PM, Ted Yu <yu...@gmail.com> wrote:
> > Can you show us what you find in /tmp/<user>/hive.log ?
> >
> > On Sun, May 2, 2010 at 7:06 PM, Susanne Lehmann <
> > susanne.lehmann@metamarketsgroup.com> wrote:
> >
> >> I am using Hadoop on EC2 with pre-configured scripts. So I figured
> >> out, that the properties are already set correctly (I am using gzip):
> >>
> >> <property>
> >> <name>io.compression.codecs</name>
> >>
> >>
> <value>org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec</value>
> >> </property>
> >> <property>
> >>
> >> Do you have another idea?
> >>
> >>
> >>
> >> On Sun, May 2, 2010 at 1:52 PM, Ted Yu <yu...@gmail.com> wrote:
> >> > You can find sample config from
> >> > http://code.google.com/p/hadoop-gpl-compression/wiki/FAQ
> >> > Look for io.compression.codecs
> >> >
> >> > On Sun, May 2, 2010 at 1:28 PM, Susanne Lehmann <
> >> > susanne.lehmann@metamarketsgroup.com> wrote:
> >> >
> >> >> No, I did't. Can you specify what exactly I have to do?
> >> >> Thank you so much for your help!
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> On Sun, May 2, 2010 at 1:11 PM, Ted Yu <yu...@gmail.com> wrote:
> >> >> > Did you add codec for the compressed files into
> io.compression.codecs
> >> in
> >> >> > hadoop
> >> >> > configuration files (core-site.xml) ?
> >> >> >
> >> >> > On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann <
> >> >> > susanne.lehmann@metamarketsgroup.com> wrote:
> >> >> >
> >> >> >> Hi,
> >> >> >>
> >> >> >> I want to load data from HDFS to Hive, the data is in compressed
> >> files.
> >> >> >> The data is stored in flat files, the delimiter is ^A (ctrl-A).
> >> >> >> As long as I use de-compressed files everything is working fine.
> >> Since
> >> >> >> ctrl-A is the default delimiter I even don't need a specification
> for
> >> >> >> it. I do the following:
> >> >> >>
> >> >> >>
> >> >> >> hadoop dfs -put /test/file new
> >> >> >>
> >> >> >> hive> DROP TABLE test_new;
> >> >> >> OK
> >> >> >> Time taken: 0.057 seconds
> >> >> >> hive> CREATE TABLE test_new(
> >> >> >> > bla int,
> >> >> >> > bla string,
> >> >> >> > etc
> >> >> >> > bla string);
> >> >> >> OK
> >> >> >> Time taken: 0.035 seconds
> >> >> >> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
> >> >> >> Loading data to table test_new
> >> >> >> OK
> >> >> >> Time taken: 0.063 seconds
> >> >> >>
> >> >> >> But if I do the same with the same file compressed it's not
> working
> >> >> >> anymore. I tried tons of different table definitions with the
> >> >> >> delimiter specified, but it doesn't go. The load itself works, but
> >> the
> >> >> >> data is always NULL, so there is a delimiter problem I conclude.
> >> >> >>
> >> >> >> Any help is greatly appreciated!
> >> >> >>
> >> >> >
> >> >>
> >> >
> >>
> >
>
Re: problem w/ data load
Posted by Susanne Lehmann <su...@metamarketsgroup.com>.
There is nothing in the logfile. (I copied it away before the load and
there is no new entry created.) The only thing is, that the values in
the table are not ok. That's how the output looks like:
hive> select * from test_new limit 5;
OK
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
NULL ����X��[$���TEw�#[RM�Z|�;<�;}\��Zt�J�w}�"�ʱ��hb�y�!�$����z}��x����Q��i������W�u�*��t~�]�_v|���vƏ��#n,�f����~�in�ouO�벜��gO�]�˲�\'���N0�-�]��_θ�9�ފ^h���F۱���nze���,��yI��.�4��R*� NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
NULL =�j$m��� ����R�:y�t� NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL NULL
Time taken: 3.089 seconds
On Sun, May 2, 2010 at 7:22 PM, Ted Yu <yu...@gmail.com> wrote:
> Can you show us what you find in /tmp/<user>/hive.log ?
>
> On Sun, May 2, 2010 at 7:06 PM, Susanne Lehmann <
> susanne.lehmann@metamarketsgroup.com> wrote:
>
>> I am using Hadoop on EC2 with pre-configured scripts. So I figured
>> out, that the properties are already set correctly (I am using gzip):
>>
>> <property>
>> <name>io.compression.codecs</name>
>>
>> <value>org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec</value>
>> </property>
>> <property>
>>
>> Do you have another idea?
>>
>>
>>
>> On Sun, May 2, 2010 at 1:52 PM, Ted Yu <yu...@gmail.com> wrote:
>> > You can find sample config from
>> > http://code.google.com/p/hadoop-gpl-compression/wiki/FAQ
>> > Look for io.compression.codecs
>> >
>> > On Sun, May 2, 2010 at 1:28 PM, Susanne Lehmann <
>> > susanne.lehmann@metamarketsgroup.com> wrote:
>> >
>> >> No, I did't. Can you specify what exactly I have to do?
>> >> Thank you so much for your help!
>> >>
>> >>
>> >>
>> >>
>> >> On Sun, May 2, 2010 at 1:11 PM, Ted Yu <yu...@gmail.com> wrote:
>> >> > Did you add codec for the compressed files into io.compression.codecs
>> in
>> >> > hadoop
>> >> > configuration files (core-site.xml) ?
>> >> >
>> >> > On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann <
>> >> > susanne.lehmann@metamarketsgroup.com> wrote:
>> >> >
>> >> >> Hi,
>> >> >>
>> >> >> I want to load data from HDFS to Hive, the data is in compressed
>> files.
>> >> >> The data is stored in flat files, the delimiter is ^A (ctrl-A).
>> >> >> As long as I use de-compressed files everything is working fine.
>> Since
>> >> >> ctrl-A is the default delimiter I even don't need a specification for
>> >> >> it. I do the following:
>> >> >>
>> >> >>
>> >> >> hadoop dfs -put /test/file new
>> >> >>
>> >> >> hive> DROP TABLE test_new;
>> >> >> OK
>> >> >> Time taken: 0.057 seconds
>> >> >> hive> CREATE TABLE test_new(
>> >> >> > bla int,
>> >> >> > bla string,
>> >> >> > etc
>> >> >> > bla string);
>> >> >> OK
>> >> >> Time taken: 0.035 seconds
>> >> >> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
>> >> >> Loading data to table test_new
>> >> >> OK
>> >> >> Time taken: 0.063 seconds
>> >> >>
>> >> >> But if I do the same with the same file compressed it's not working
>> >> >> anymore. I tried tons of different table definitions with the
>> >> >> delimiter specified, but it doesn't go. The load itself works, but
>> the
>> >> >> data is always NULL, so there is a delimiter problem I conclude.
>> >> >>
>> >> >> Any help is greatly appreciated!
>> >> >>
>> >> >
>> >>
>> >
>>
>
Re: problem w/ data load
Posted by Ted Yu <yu...@gmail.com>.
Can you show us what you find in /tmp/<user>/hive.log ?
On Sun, May 2, 2010 at 7:06 PM, Susanne Lehmann <
susanne.lehmann@metamarketsgroup.com> wrote:
> I am using Hadoop on EC2 with pre-configured scripts. So I figured
> out, that the properties are already set correctly (I am using gzip):
>
> <property>
> <name>io.compression.codecs</name>
>
> <value>org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec</value>
> </property>
> <property>
>
> Do you have another idea?
>
>
>
> On Sun, May 2, 2010 at 1:52 PM, Ted Yu <yu...@gmail.com> wrote:
> > You can find sample config from
> > http://code.google.com/p/hadoop-gpl-compression/wiki/FAQ
> > Look for io.compression.codecs
> >
> > On Sun, May 2, 2010 at 1:28 PM, Susanne Lehmann <
> > susanne.lehmann@metamarketsgroup.com> wrote:
> >
> >> No, I did't. Can you specify what exactly I have to do?
> >> Thank you so much for your help!
> >>
> >>
> >>
> >>
> >> On Sun, May 2, 2010 at 1:11 PM, Ted Yu <yu...@gmail.com> wrote:
> >> > Did you add codec for the compressed files into io.compression.codecs
> in
> >> > hadoop
> >> > configuration files (core-site.xml) ?
> >> >
> >> > On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann <
> >> > susanne.lehmann@metamarketsgroup.com> wrote:
> >> >
> >> >> Hi,
> >> >>
> >> >> I want to load data from HDFS to Hive, the data is in compressed
> files.
> >> >> The data is stored in flat files, the delimiter is ^A (ctrl-A).
> >> >> As long as I use de-compressed files everything is working fine.
> Since
> >> >> ctrl-A is the default delimiter I even don't need a specification for
> >> >> it. I do the following:
> >> >>
> >> >>
> >> >> hadoop dfs -put /test/file new
> >> >>
> >> >> hive> DROP TABLE test_new;
> >> >> OK
> >> >> Time taken: 0.057 seconds
> >> >> hive> CREATE TABLE test_new(
> >> >> > bla int,
> >> >> > bla string,
> >> >> > etc
> >> >> > bla string);
> >> >> OK
> >> >> Time taken: 0.035 seconds
> >> >> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
> >> >> Loading data to table test_new
> >> >> OK
> >> >> Time taken: 0.063 seconds
> >> >>
> >> >> But if I do the same with the same file compressed it's not working
> >> >> anymore. I tried tons of different table definitions with the
> >> >> delimiter specified, but it doesn't go. The load itself works, but
> the
> >> >> data is always NULL, so there is a delimiter problem I conclude.
> >> >>
> >> >> Any help is greatly appreciated!
> >> >>
> >> >
> >>
> >
>
Re: problem w/ data load
Posted by Susanne Lehmann <su...@metamarketsgroup.com>.
I am using Hadoop on EC2 with pre-configured scripts. So I figured
out, that the properties are already set correctly (I am using gzip):
<property>
<name>io.compression.codecs</name>
<value>org.apache.hadoop.io.compress.DefaultCodec,org.apache.hadoop.io.compress.GzipCodec</value>
</property>
<property>
Do you have another idea?
On Sun, May 2, 2010 at 1:52 PM, Ted Yu <yu...@gmail.com> wrote:
> You can find sample config from
> http://code.google.com/p/hadoop-gpl-compression/wiki/FAQ
> Look for io.compression.codecs
>
> On Sun, May 2, 2010 at 1:28 PM, Susanne Lehmann <
> susanne.lehmann@metamarketsgroup.com> wrote:
>
>> No, I did't. Can you specify what exactly I have to do?
>> Thank you so much for your help!
>>
>>
>>
>>
>> On Sun, May 2, 2010 at 1:11 PM, Ted Yu <yu...@gmail.com> wrote:
>> > Did you add codec for the compressed files into io.compression.codecs in
>> > hadoop
>> > configuration files (core-site.xml) ?
>> >
>> > On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann <
>> > susanne.lehmann@metamarketsgroup.com> wrote:
>> >
>> >> Hi,
>> >>
>> >> I want to load data from HDFS to Hive, the data is in compressed files.
>> >> The data is stored in flat files, the delimiter is ^A (ctrl-A).
>> >> As long as I use de-compressed files everything is working fine. Since
>> >> ctrl-A is the default delimiter I even don't need a specification for
>> >> it. I do the following:
>> >>
>> >>
>> >> hadoop dfs -put /test/file new
>> >>
>> >> hive> DROP TABLE test_new;
>> >> OK
>> >> Time taken: 0.057 seconds
>> >> hive> CREATE TABLE test_new(
>> >> > bla int,
>> >> > bla string,
>> >> > etc
>> >> > bla string);
>> >> OK
>> >> Time taken: 0.035 seconds
>> >> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
>> >> Loading data to table test_new
>> >> OK
>> >> Time taken: 0.063 seconds
>> >>
>> >> But if I do the same with the same file compressed it's not working
>> >> anymore. I tried tons of different table definitions with the
>> >> delimiter specified, but it doesn't go. The load itself works, but the
>> >> data is always NULL, so there is a delimiter problem I conclude.
>> >>
>> >> Any help is greatly appreciated!
>> >>
>> >
>>
>
Re: problem w/ data load
Posted by Ted Yu <yu...@gmail.com>.
You can find sample config from
http://code.google.com/p/hadoop-gpl-compression/wiki/FAQ
Look for io.compression.codecs
On Sun, May 2, 2010 at 1:28 PM, Susanne Lehmann <
susanne.lehmann@metamarketsgroup.com> wrote:
> No, I did't. Can you specify what exactly I have to do?
> Thank you so much for your help!
>
>
>
>
> On Sun, May 2, 2010 at 1:11 PM, Ted Yu <yu...@gmail.com> wrote:
> > Did you add codec for the compressed files into io.compression.codecs in
> > hadoop
> > configuration files (core-site.xml) ?
> >
> > On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann <
> > susanne.lehmann@metamarketsgroup.com> wrote:
> >
> >> Hi,
> >>
> >> I want to load data from HDFS to Hive, the data is in compressed files.
> >> The data is stored in flat files, the delimiter is ^A (ctrl-A).
> >> As long as I use de-compressed files everything is working fine. Since
> >> ctrl-A is the default delimiter I even don't need a specification for
> >> it. I do the following:
> >>
> >>
> >> hadoop dfs -put /test/file new
> >>
> >> hive> DROP TABLE test_new;
> >> OK
> >> Time taken: 0.057 seconds
> >> hive> CREATE TABLE test_new(
> >> > bla int,
> >> > bla string,
> >> > etc
> >> > bla string);
> >> OK
> >> Time taken: 0.035 seconds
> >> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
> >> Loading data to table test_new
> >> OK
> >> Time taken: 0.063 seconds
> >>
> >> But if I do the same with the same file compressed it's not working
> >> anymore. I tried tons of different table definitions with the
> >> delimiter specified, but it doesn't go. The load itself works, but the
> >> data is always NULL, so there is a delimiter problem I conclude.
> >>
> >> Any help is greatly appreciated!
> >>
> >
>
Re: problem w/ data load
Posted by Susanne Lehmann <su...@metamarketsgroup.com>.
No, I did't. Can you specify what exactly I have to do?
Thank you so much for your help!
On Sun, May 2, 2010 at 1:11 PM, Ted Yu <yu...@gmail.com> wrote:
> Did you add codec for the compressed files into io.compression.codecs in
> hadoop
> configuration files (core-site.xml) ?
>
> On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann <
> susanne.lehmann@metamarketsgroup.com> wrote:
>
>> Hi,
>>
>> I want to load data from HDFS to Hive, the data is in compressed files.
>> The data is stored in flat files, the delimiter is ^A (ctrl-A).
>> As long as I use de-compressed files everything is working fine. Since
>> ctrl-A is the default delimiter I even don't need a specification for
>> it. I do the following:
>>
>>
>> hadoop dfs -put /test/file new
>>
>> hive> DROP TABLE test_new;
>> OK
>> Time taken: 0.057 seconds
>> hive> CREATE TABLE test_new(
>> > bla int,
>> > bla string,
>> > etc
>> > bla string);
>> OK
>> Time taken: 0.035 seconds
>> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
>> Loading data to table test_new
>> OK
>> Time taken: 0.063 seconds
>>
>> But if I do the same with the same file compressed it's not working
>> anymore. I tried tons of different table definitions with the
>> delimiter specified, but it doesn't go. The load itself works, but the
>> data is always NULL, so there is a delimiter problem I conclude.
>>
>> Any help is greatly appreciated!
>>
>
Re: problem w/ data load
Posted by Ted Yu <yu...@gmail.com>.
Did you add codec for the compressed files into io.compression.codecs in
hadoop
configuration files (core-site.xml) ?
On Sun, May 2, 2010 at 11:22 AM, Susanne Lehmann <
susanne.lehmann@metamarketsgroup.com> wrote:
> Hi,
>
> I want to load data from HDFS to Hive, the data is in compressed files.
> The data is stored in flat files, the delimiter is ^A (ctrl-A).
> As long as I use de-compressed files everything is working fine. Since
> ctrl-A is the default delimiter I even don't need a specification for
> it. I do the following:
>
>
> hadoop dfs -put /test/file new
>
> hive> DROP TABLE test_new;
> OK
> Time taken: 0.057 seconds
> hive> CREATE TABLE test_new(
> > bla int,
> > bla string,
> > etc
> > bla string);
> OK
> Time taken: 0.035 seconds
> hive> LOAD DATA INPATH "/test/file" INTO TABLE test_new;
> Loading data to table test_new
> OK
> Time taken: 0.063 seconds
>
> But if I do the same with the same file compressed it's not working
> anymore. I tried tons of different table definitions with the
> delimiter specified, but it doesn't go. The load itself works, but the
> data is always NULL, so there is a delimiter problem I conclude.
>
> Any help is greatly appreciated!
>