hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Parimi, Nagender" <par...@amazon.com>
Subject RE: Initializing a custom UDF
Date Tue, 14 Feb 2012 04:25:44 GMT
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:wd@wdicc.com] 
Sent: Monday, February 13, 2012 6:58 PM
To: user@hive.apache.org
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 <parimi@amazon.com> 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

Mime
View raw message