hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Lee (JIRA)" <j...@apache.org>
Subject [jira] Updated: (HIVE-309) FunctionRegistry should allow loading UDFs and UDAFs from property file
Date Fri, 27 Feb 2009 01:04:01 GMT

     [ https://issues.apache.org/jira/browse/HIVE-309?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Richard Lee updated HIVE-309:
-----------------------------

    Attachment: hive-external-functions.diff

This attachment modifies FunctionRegistry so that it looks for a SystemResource 'hive-udf.properties'
which is overridable by setting org.apache.hadoop.hive.ql.exec.FunctionRegistry.propertyfile
to the name of the resource to search for.  This allows placement of the resource anywhere
in the classpath.

The hive-udf.properties file contains definitions for UDF and UDAFs in the following way:

udf.OPERATORTYPE.FUNCTIONNAME=CLASSNAME
udaf.OPERATORTYPE.FUNCTIONNAME=CLASSNAME

OPERATORTYPE is a string that is parsable by Enum.valueOf(FunctionInfo.OperatorType).
CLASSNAME is the fully qualified name of the function's implementation.

note that in UDAF, OPERATORTYPE isn't significant.

This patch was generated from trunk revision 748227

> FunctionRegistry should allow loading UDFs and UDAFs from property file
> -----------------------------------------------------------------------
>
>                 Key: HIVE-309
>                 URL: https://issues.apache.org/jira/browse/HIVE-309
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Query Processor
>            Reporter: Richard Lee
>         Attachments: hive-external-functions.diff
>
>
> FunctionRegistry.java hard code all UDF, UDAF definitions in a static initializer.  There
is no way to add new functions without directly modifying this file.  
> FunctionRegistry SHOULD look for a property file in which new functions and their implementations
can be specified.  This will allow third parties to extend hive without maintaining patches
against the codebase. 

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message