[ 
https://issues.apache.org/jira/browse/HIVE-2561?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13154720#comment-13154720
 ] 

Edward Capriolo commented on HIVE-2561:
---------------------------------------

If you look at the direction Java has gone with systems like Guice, dependency 
injection, and OSGi if has become the job of the packager to make sure the 
classpath is proper. I can see the case for add FILE. Although throwing a 
Runtime exception can convey the same information throw new 
RunTimeException("could not find X in distributed cache"), but for other jars 
we are just coming up with exotic wrapping for ClassNotFoundException(). I 
think developing custom annotations to deal with user space errors bloats the 
codebase. 

I do have a GEOIP UDF that has exactly this problem, needing other jars and an 
external file in the distributed cache but I think annotation based dependency 
declaration does not have a large advantage over throwing exceptions. This is a 
pretty nitch case.  The only one I see is you will get an error in the compile 
phase rather then the MR phase.   
                
> Allow UDFs 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
>         Attachments: HIVE-2561.D507.1.patch
>
>
> 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

        

Reply via email to