Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # user - Custom SerDe: Initialize() passes a null configuration to my Custom SerDe


Copy link to this message
-
Re: Custom SerDe: Initialize() passes a null configuration to my Custom SerDe
Edward Capriolo 2013-10-14, 17:06
Have you seen?

https://github.com/edwardcapriolo/hive-protobuf/
On Mon, Oct 14, 2013 at 8:16 AM, Rui Martins <[EMAIL PROTECTED]> wrote:

> Hi hive users,
>
> I am writing a custom SerDe that loads any protocol buffer generated
> class.
> For flexibility this class can live in a jar external to the SerDe's jar
> and then I just use the Hive Configuration class passed in the initiliaze
> to dynamically load it and set the schema for the Hive table.
>
>
> http://grepcode.com/file/repository.cloudera.com/content/repositories/releases/org.apache.hadoop.hive/hive-serde/0.7.0-cdh3u0/org/apache/hadoop/hive/serde2/Serializer.java#Serializer
>
> When I use my custom SerDe as a Deserializer it all works well, I get a
> Configuration and I correctly load the ProtoBuffer class from the external
> Jar.
>
> However, when I use the SerDe as a Serializer, the Configuration is always
> set to null so I have no way of loading the external class from the Jar.
>
> My questions are:
>
> *  1) Is the initialize(..) method in Serializer supposed to always pass
> a null Configuration?*
> *
> *
> *  2) Is there a way of creating or retrieving the current Hadoop/Hive
> Configuration when this parameter is passed as null?*
> *
> *
>
> Thank you,
> rui
>