FAQ
If I have a custom udf, is it treated as a singleton? If there is some heavy
initialization for the udf that would obviously help. In this case though
i'd imagine the udf must be thread-safe.

Thanks,
Vijay

Search Discussions

  • Zheng Shao at Oct 15, 2009 at 10:00 am
    We use a single instance of the udf for each node in the expression tree.

    For example, in a+b, + will be called by all the rows of the table,
    and we have a single instance of +.

    However, in a+b+c, there will be 2 instances of +.

    in a lot of the udfs, we already do such initializations. Take a look
    at UDFRegExp.java for an example.

    Zheng

    On 10/14/09, Vijay wrote:
    If I have a custom udf, is it treated as a singleton? If there is some heavy
    initialization for the udf that would obviously help. In this case though
    i'd imagine the udf must be thread-safe.

    Thanks,
    Vijay
    --
    Sent from Gmail for mobile | mobile.google.com

    Yours,
    Zheng

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedOct 15, '09 at 2:02a
activeOct 15, '09 at 10:00a
posts2
users2
websitehive.apache.org

2 users in discussion

Zheng Shao: 1 post Vijay: 1 post

People

Translate

site design / logo © 2021 Grokbase