[ https://issues.apache.org/jira/browse/HIVE-2561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13146697#comment-13146697 ]
Andrew T. Fiore commented on HIVE-2561: --------------------------------------- That seems like a good idea. Do you mean a member method in the UDF class (or its children) or a method that a UDF class could call on something else to fetch the info? That is, would UDFs pull these environment vars, etc., by calling some getter as needed, or would they be pushed to them by the Hive runtime (e.g., by calling a setter on a UDF class before its evaluate() is called)? Is there already some way for any Hive class to get info from a central config store somewhere? I'm unclear on what "ADD JAR" and "ADD FILE" in the Hive CLI do. In my own tests with loading files from an absolute path, I can directly read (i.e., open a file handle) from an absolute path when running in local mode. When the job is sent out to the cluster, this fails, though that might be because the cluster nodes don't mount the same share in the same way as my local machine. However, if I "ADD FILE [absolute-path]" from the CLI, then the UDF running on the cluster node can open a file handle with just the file name (i.e., no path). Point being -- will the approach we're talking about work if the dependency files live at different absolute paths from the point of view of the CLI client machine and the cluster nodes? > Add an annotation to UDFs to allow them to specify additional FILE/JAR > resources necessary for execution > -------------------------------------------------------------------------------------------------------- > > Key: HIVE-2561 > URL: https://issues.apache.org/jira/browse/HIVE-2561 > Project: Hive > Issue Type: New Feature > Reporter: Jonathan Chang > Assignee: Jonathan Chang > > Often times UDFs will have dependencies to external JARs/FILEs. It makes > sense for these to be encoded by the UDF (rather than having the caller > remember the set of files that need to be ADDed). Let's add an annotation to > UDFs which will cause these resources to be auto-added. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira