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

ASF subversion and git services commented on IMPALA-8016:
---------------------------------------------------------

Commit 635149b85f209aceb0eb7680a904c303117e3ca1 in impala's branch 
refs/heads/master from Philip Zeyliger
[ https://git-wip-us.apache.org/repos/asf?p=impala.git;h=635149b ]

IMPALA-8016: Fix lifecycle of classloader for UDFs.

The ClassLoader whence a UDF was loaded needs to be kept open for
executions of the UDF, so that the UDF can load other classes from the
same jar. (A typical scenario might be a utility class.) This was
broken by the fix to IMPALA-7668.

This commit moves closing the ClassLoader to the close() function.

A test for a UDF that imports a static method from another file has been
added. Doing so failed without this change.

Change-Id: Ic02e42fb25a2754ede21fe00312a60f07e0ba8a2
Reviewed-on: http://gerrit.cloudera.org:8080/12125
Reviewed-by: Philip Zeyliger <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>


> UDFs unable to use other functions defined in same jar
> ------------------------------------------------------
>
>                 Key: IMPALA-8016
>                 URL: https://issues.apache.org/jira/browse/IMPALA-8016
>             Project: IMPALA
>          Issue Type: Task
>          Components: Frontend
>            Reporter: Philip Zeyliger
>            Assignee: Philip Zeyliger
>            Priority: Critical
>
> The fix for IMPALA-7668 introduced a bug wherein a UDF calling other 
> functions within the same jar would fail with errors like:
> {code}
> WARNINGS: UDF WARNING: Hive UDF 
> path=hdfs://localhost:20500/test-warehouse/impala-hive-udfs2.jar 
> class=org.apache.impala.ImportsNearbyClassesUdf failed due to: 
> ImpalaRuntimeException: UDF::evaluate() ran into a problem.
> CAUSED BY: ImpalaRuntimeException: UDF failed to evaluate
> CAUSED BY: InvocationTargetException: null
> CAUSED BY: NoClassDefFoundError: org/apache/impala/UtilForUdf
> CAUSED BY: ClassNotFoundException: org.apache.impala.UtilForUdf
> {code}
> I believe this is caused by over-eagerly closing the associated class loader, 
> which was introduced recently in IMPALA-7668.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to