You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by Zhang Xiaoyu <zh...@gmail.com> on 2013/10/17 08:34:15 UTC
Google ProtocolBufferException exception when using ORC file format
Hi, all,
I am simply using ORC file to store the data and get below exception. Any
idea what's wrong with it?
create table test (f1 int) stored as orc tblproperties
("orc.compress"="NONE");
load data local inpath '/home/athena/test.txt' into table test;
select * from test;
===>
Error: java.io.IOException:
com.google.protobuf.InvalidProtocolBufferException: While parsing a
protocol message, the input ended unexpectedly in the middle of a field.
This could mean either than the input has been truncated or that an
embedded message misreported its own length. (state=,code=0)
Thanks for help!
Johnny
Re: Google ProtocolBufferException exception when using ORC file format
Posted by Zhang Xiaoyu <zh...@gmail.com>.
Thanks, Nitin, I guess, as you suggested. I can use text format in temp
table (staging table), and use final table as ORC format. So when I merge
data from staging table to final table, data got re-formatted from text
into ORC.
Johnny
On Wed, Oct 16, 2013 at 11:46 PM, Nitin Pawar <ni...@gmail.com>wrote:
> Hi Zhang,
>
> you can not load a text file as orc file as load command does not
> transform your txt file to orc.
> To write a orc file you will need to use hcatalog apis.
>
> What you can do is
> create a temp table and load the data there.
> then do a insert into table test select * from temptest
>
>
>
> On Thu, Oct 17, 2013 at 12:04 PM, Zhang Xiaoyu <zh...@gmail.com>wrote:
>
>> Hi, all,
>> I am simply using ORC file to store the data and get below exception. Any
>> idea what's wrong with it?
>>
>> create table test (f1 int) stored as orc tblproperties
>> ("orc.compress"="NONE");
>>
>> load data local inpath '/home/athena/test.txt' into table test;
>>
>> select * from test;
>>
>> ===>
>> Error: java.io.IOException:
>> com.google.protobuf.InvalidProtocolBufferException: While parsing a
>> protocol message, the input ended unexpectedly in the middle of a field.
>> This could mean either than the input has been truncated or that an
>> embedded message misreported its own length. (state=,code=0)
>>
>> Thanks for help!
>> Johnny
>>
>
>
>
> --
> Nitin Pawar
>
Re: Google ProtocolBufferException exception when using ORC file format
Posted by Nitin Pawar <ni...@gmail.com>.
Hi Zhang,
you can not load a text file as orc file as load command does not transform
your txt file to orc.
To write a orc file you will need to use hcatalog apis.
What you can do is
create a temp table and load the data there.
then do a insert into table test select * from temptest
On Thu, Oct 17, 2013 at 12:04 PM, Zhang Xiaoyu <zh...@gmail.com>wrote:
> Hi, all,
> I am simply using ORC file to store the data and get below exception. Any
> idea what's wrong with it?
>
> create table test (f1 int) stored as orc tblproperties
> ("orc.compress"="NONE");
>
> load data local inpath '/home/athena/test.txt' into table test;
>
> select * from test;
>
> ===>
> Error: java.io.IOException:
> com.google.protobuf.InvalidProtocolBufferException: While parsing a
> protocol message, the input ended unexpectedly in the middle of a field.
> This could mean either than the input has been truncated or that an
> embedded message misreported its own length. (state=,code=0)
>
> Thanks for help!
> Johnny
>
--
Nitin Pawar