This is the same problem I was getting, I've put a snippit of the code
I as was using here :- https://gist.github.com/804551

With this I get null whenever I try to read the ResourceSchema object
in the checkSchema() method.

I've had a look over the AvroStorage and it seems to assume the
ResourceSchema won't be null at this point in time so I'm not sure
what's going on for me.
Does anyone know if this is the best way to get the schema, or if pig
will ever send a null schema to the checkSchema method?

Thanks,

On 1 February 2011 04:46, Jacob Perkins <[email protected]> wrote:
>
> Trying to write a simple storefunc that makes use of the input data's
> field names. Is there a way to gain access to this inside of the call to
> putNext? Ostensibly you could set a variable with the schema during the
> call to checkSchema, eg. in HBaseStorage, but as far as I can tell this
> is null by the time putNext is called. Is there some other way or am I
> missing something obvious?
>
> --jacob
> @thedatachef
>



--
Dan Harvey | Datamining Engineer
www.mendeley.com/profiles/dan-harvey

Mendeley Limited | London, UK | www.mendeley.com
Registered in England and Wales | Company Number 6419015

Reply via email to