Re: UDF Configure method not getting called

2015-08-28 Thread Rahul Sharma
;>> >>> ​During initialize() you can call SessionState.get(), if it is not null >>> then this initialize() call is happening during query compilation, and you >>> can then use SessionState.get().getConf() to get the configuration. >>> GenericUDFBaseNumeric has an example of thi

Re: UDF Configure method not getting called

2015-08-28 Thread Moore, Douglas
Maybe someone might have a suggestion. From: Rahul Sharma mailto:kippy@gmail.com>> Sent: Wednesday, August 26, 2015 9:39 AM To: user@hive.apache.org<mailto:user@hive.apache.org> Subject: Re: UDF Configure method not getting called Thanks again Ja

Re: UDF Configure method not getting called

2015-08-28 Thread Rahul Sharma
might have a suggestion. > > > > -- > *From:* Rahul Sharma > *Sent:* Wednesday, August 26, 2015 9:39 AM > > *To:* user@hive.apache.org > *Subject:* Re: UDF Configure method not getting called > > Thanks again Jason. I tried hive.fetch.task.conversion=minimal/none

Re: UDF Configure method not getting called

2015-08-26 Thread Jason Dere
st 26, 2015 9:39 AM To: user@hive.apache.org Subject: Re: UDF Configure method not getting called Thanks again Jason. I tried hive.fetch.task.conversion=minimal/none and it ran a map-reduce task and the UDF ran fine. The problem with this approach is that the property needs to be changed in conf.ser

Re: UDF Configure method not getting called

2015-08-26 Thread Rahul Sharma
--- > *From:* Rahul Sharma > *Sent:* Tuesday, August 25, 2015 2:48 PM > *To:* user@hive.apache.org > *Subject:* Re: UDF Configure method not getting called > > Or alternatively, is there a way to pass configuration without using the > configure method? > > The co

Re: UDF Configure method not getting called

2015-08-25 Thread Jason Dere
n try hive.fetch.task.conversion=minimal/none and hive.optimize.constant.propagation=false and see how it works. From: Rahul Sharma Sent: Tuesday, August 25, 2015 2:48 PM To: user@hive.apache.org Subject: Re: UDF Configure method not getting called Or alternativel

Re: UDF Configure method not getting called

2015-08-25 Thread Rahul Sharma
Or alternatively, is there a way to pass configuration without using the configure method? The configuration to the UDF is essentially a list of parameters that tells the UDF, what it should morph into this time and what kind of work it should perform. If there is an all encompassing way to do tha

Re: UDF Configure method not getting called

2015-08-25 Thread Rahul Sharma
Oh thanks for the reply, Jason. That was my suspicion too. The UDF in our case is not a function per say in pure mathematical sense of the word 'function'. That is because, it doesn't take in a value and give out another value. It has side effects, that form input for another MapReduce job. The po

Re: UDF Configure method not getting called

2015-08-25 Thread Jason Dere
?There might be a few cases where a UDF is executed locally and not as part of a Map/Reduce job?: - Hive might choose not to run a M/R task for your query (see hive.fetch.task.conversion) - If the UDF is deterministic and has deterministic inputs, Hive might decide to run the UDF once to get

Re: UDF Configure method not getting called

2015-08-25 Thread Rahul Sharma
Also seems like the UDF is being run on the client machine (I am using beeline). No map reduce job gets spawned. I have removed limit clause as I found that solved the issue for someone else in the mailing list. However, still no luck. I looked at the MapredContext class's needConfigure method and