[ https://issues.apache.org/jira/browse/HIVE-11663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14716072#comment-14716072 ]
liuzongquan commented on HIVE-11663: ------------------------------------ The implementation is improve CLIService.java and CliDriver.java. When connecting hive throw thrift, CLIService will call function initCustomUDF(SessionHandle sessionHandle), this will load all functions configged in hive-udf.properties, which is a custom defined properties file underlying $HIVE_HOME/conf. Actully, hive-udf.properties can be renamed in hive-site.conf, which set all configuration for this feature, as below. <property> <name>hive.server2.customized.udf.enabled</name> <value>false</value> <description>Whether enable hiveserver add customized udf from adding jars, default value is false</description> </property> <property> <name>hive.server2.customized.udf.jars.path</name> <value/> <description/> </property> <property> <name>hive.server2.customized.udf.properties</name> <value>hive-udf.properties</value> <description>The customized udf functions' defination file. It's must be under $HIVE_HOME/conf directory. The patern is as below.func_name={udf_jar_name,udf_class_name}</description> </property> > Auto load/unload custom udf function for hive cli and hiveserver2 > ----------------------------------------------------------------- > > Key: HIVE-11663 > URL: https://issues.apache.org/jira/browse/HIVE-11663 > Project: Hive > Issue Type: Improvement > Components: CLI, Configuration > Affects Versions: 0.14.0, 1.0.0, 1.0.1, 1.1.1, 1.2.1 > Reporter: liuzongquan > Assignee: liuzongquan > Labels: features, patch > Attachments: HIVE-11663.patch > > Original Estimate: 96h > Remaining Estimate: 96h > > when adding custom functions used in hiveserver2, the most method is re-build > the hive source code, re-dist and restart hiveserver2. This way will produce > big cost for service user and cluster manager. The best way, in my opinion, > the custom udf should be like a plugin to the hiveserver2 and hive cli, and > users should be add and remove at run-time, especially for hiveserver2. -- This message was sent by Atlassian JIRA (v6.3.4#6332)