creating a hive table using proto buf serde

501 views
Skip to first unread message

Namit Jain

unread,
Jul 10, 2013, 7:10:44 AM7/10/13
to elephant...@googlegroups.com
I tried to do the following.

hive>                                                              
    > create table users
    >   row format serde "com.twitter.elephantbird.hive.serde.ProtobufDeserializer"
    >   with serdeproperties (
    >   "serialization.class"=
    >   "org.apache.hadoop.hive.serde2.proto.test.Complexpb$Complex")
    >   stored as
    >   inputformat "com.twitter.elephantbird.mapred.input.DeprecatedRawMultiInputFormat"
    >   outputformat "org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat"
    > ;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException java.lang.ClassCastException: class org.apache.hadoop.hive.serde2.proto.test.Complexpb$Complex)

I compiled hive/elephant-bird from trunk.

The error code in /tmp/namit/hive.log is as follows:

Caused by: java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException java.lang.\
ClassCastException: class org.apache.hadoop.hive.serde2.proto.test.Complexpb$Complex)
        at org.apache.hadoop.hive.ql.metadata.Table.getDeserializerFromMetaStore(Table.java:275)
        at org.apache.hadoop.hive.ql.metadata.Table.getDeserializer(Table.java:266)
        at org.apache.hadoop.hive.ql.metadata.Table.getCols(Table.java:592)
        at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:577)
        ... 19 more
Caused by: MetaException(message:org.apache.hadoop.hive.serde2.SerDeException java.lang.ClassCastException: class or\
g.apache.hadoop.hive.serde2.proto.test.Complexpb$Complex)
        at org.apache.hadoop.hive.metastore.MetaStoreUtils.getDeserializer(MetaStoreUtils.java:226)
        at org.apache.hadoop.hive.ql.metadata.Table.getDeserializerFromMetaStore(Table.java:273)
        ... 22 more

2013-07-10 16:31:24,878 ERROR ql.Driver (SessionState.java:printError(383)) - FAILED: Execution Error, return code 1\
 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.RuntimeException: MetaException(message:org.apache.hadoop.hi\
ve.serde2.SerDeException java.lang.ClassCastException: class org.apache.hadoop.hive.serde2.proto.test.Complexpb$Comp\
lex)

I would appreciate any suggestions.

Thanks,
-namit

Joydeep Sen Sarma

unread,
Jul 22, 2013, 7:36:20 AM7/22/13
to elephant...@googlegroups.com
Hi Namit - I think you have hit this:


there are specific code paths that don't get their class path augmented after doing a 'add jar'. For your local hive install - using the AUX_PATH setting workaround might work (although i am hitting some other errors as well)

Namit Jain

unread,
Jul 22, 2013, 8:27:43 AM7/22/13
to elephantbird-dev
Setting aux_path did not help.


--
You received this message because you are subscribed to a topic in the Google Groups "elephantbird-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/elephantbird-dev/CL46SHXuBjA/unsubscribe.
To unsubscribe from this group and all its topics, send an email to elephantbird-d...@googlegroups.com.
To post to this group, send email to elephant...@googlegroups.com.
Visit this group at http://groups.google.com/group/elephantbird-dev.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages