Per the UDF definition at
http://hive.apache.org/docs/r0.7.0/api/org/apache/hadoop/hive/ql/exec/UDF.html, I could potentially pass the configuration (e.g. path to configuration file) as another argument to evaluate(). I could load the configuration on the first call to evaluate() into a singleton/static member and not reprocess it every time. This works, but in the above example, the path to configuration file will continue to be passed in to the UDF as an extra parameter. It would be cleaner to be able to pass in some arguments to the UDF when it's initialized the first time only.
-----Original Message-----
From: wd [mailto:[EMAIL PROTECTED]]
Sent: Monday, February 13, 2012 6:58 PM
To: [EMAIL PROTECTED]
Subject: Re: Initializing a custom UDF
An UDF can accept some params, you can pass your configuration in one of it?
On Tue, Feb 14, 2012 at 10:02 AM, Parimi, Nagender <[EMAIL PROTECTED]> wrote:
> Hi,
>
>
>
> Is there a way to pass in some custom arguments to a UDF when
> initializing it? I'd like to pass in some configuration parameters to
> a UDF, but didn't see a way to readily do so.
>
>
>
> thanks,
>
> Nagender