Re: UDTF fails with java.lang.ClassCastException

2015-08-06 Thread Jason Dere
Would have to look at the UDTF to know for sure what is going on - it might not be using the object inspectors properly here. Is it using the ObjectInspectors that were passed in during initialize(), or is it creating a WritableStringObjectInspector and assuming this will work with the value ob

Re: UDTF "KryoException: unable create/find class" error in hive 0.13

2014-09-10 Thread Furcy Pin
Hi, If I get your code right, you are trying to implement a sort of explode function for Map> that lists "aFieldName" values in the inner map. I think you could achieve this with a simple LATERAL VIEW explode(mapmap) T as key, map and then selecting map["aFieldName"]. If you want to go on with yo

Re: UDTF "KryoException: unable create/find class" error in hive 0.13

2014-09-09 Thread Echo Li
Hi Furcy, Thanks for sharing. I modified my code to mark the map variables "transient" but still got same error. this is the code: public class fun_name extends GenericUDTF { private PrimitiveObjectInspector stringOI = null; transient Map> mapObject; transient Map eventDetails;

Re: UDTF "KryoException: unable create/find class" error in hive 0.13

2014-09-09 Thread Furcy Pin
Hi, I think I encountered this kind of serialization problem when writing UDFs. Usually, marking every fields of the UDF as *transient* does the trick. I guess the error means that Kryo tries to serialize the UDF class and everything that is inside, and by marking them as transient you ensure tha

Re: UDTF

2014-07-28 Thread Jason Dere
July 28, 2014 4:03 PM > To: user@hive.apache.org > Subject: Re: UDTF > > you want to know how initializes an udtf or how to build udtf ? > > > On Tue, Jul 29, 2014 at 1:30 AM, Doug Christie wrote: > Can anyone point me to the source code in hive where the calls to ini

RE: UDTF

2014-07-28 Thread Doug Christie
I want to know where the call to initialize for a UDTF is made in the hive source code. Doug From: Nitin Pawar [mailto:nitinpawar...@gmail.com] Sent: Monday, July 28, 2014 4:03 PM To: user@hive.apache.org Subject: Re: UDTF you want to know how initializes an udtf or how to build udtf ? On Tue

Re: UDTF

2014-07-28 Thread Nitin Pawar
you want to know how initializes an udtf or how to build udtf ? On Tue, Jul 29, 2014 at 1:30 AM, Doug Christie wrote: > Can anyone point me to the source code in hive where the calls to > initialize, process and forward in a UDTF are made? Thanks. > > > > Doug > > > -- Nitin Pawar

Re: UDTF fails when used in LATERAL VIEW

2012-06-22 Thread Mark Grover
rning PrimitiveObjectInspectorFactory.writableStringObjectInspector Glad you found the solution. Sorry that you learned it the hard way though! Mark - Original Message - From: "Jan Dolinár" To: user@hive.apache.org Sent: Friday, June 22, 2012 1:59:03 AM Subject: Re: UDTF fails when used in LATERA

Re: UDTF fails when used in LATERAL VIEW

2012-06-21 Thread Jan Dolinár
Hi Mark, Thanks for suggestion, it is not that naïve :) I tried a lot of things and combinations, including Text and even LazyString (as I was getting exceptions about converting String to LazyString at one moment...). But I guess what I missed was correct setting of field object inspectors in in

Re: UDTF fails when used in LATERAL VIEW

2012-06-21 Thread Mark Grover
Hi Jan, Here's my first naïve question:-) Have you tried returning a Text value instead of String? Atleast in the case of UDFs, returning Text instead of Strings is possible and recommended too. I would think it would be the same case with UDTFs. Mark - Original Message - From: "Jan Do