[
https://issues.apache.org/jira/browse/TRAFODION-2534?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15948263#comment-15948263
]
ASF GitHub Bot commented on TRAFODION-2534:
-------------------------------------------
GitHub user zellerh opened a pull request:
https://github.com/apache/incubator-trafodion/pull/1033
TRAFODION-2534 CLASSPATH for Java UDRs
Two changes in the custom Java class loader used for UDRs.
First, the class loader now adds any jar files stored in
$TRAF_HOME/udr/public/external_libs to its CLASSPATH.
The choice of this directory is anticipating work on
isolated UDFs, see TRAFODION-2561.
Second, the custom class loader LmClassLoader now uses
java.net.URLClassLoader to do most of the work. This allows
us to delete a lot of code in this file. When this class
was first written, many years ago, the URLClassLoader was
probably not yet available.
Finally, with the new class loader, the JDBC predefined
UDF can also be simplified.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/zellerh/incubator-trafodion bug/cses_jan-17
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/incubator-trafodion/pull/1033.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1033
----
commit da1b7b8f8d6b0ed3d8b40cd43406a9e1a717d776
Author: Hans Zeller <[email protected]>
Date: 2017-03-30T01:04:51Z
TRAFODION-2534 CLASSPATH for Java UDRs
Two changes in the custom Java class loader used for UDRs.
First, the class loader now adds any jar files stored in
$TRAF_HOME/udr/public/external_libs to its CLASSPATH.
The choice of this directory is anticipating work on
isolated UDFs, see TRAFODION-2561.
Second, the custom class loader LmClassLoader now uses
java.net.URLClassLoader to do most of the work. This allows
us to delete a lot of code in this file. When this class
was first written, many years ago, the URLClassLoader was
probably not yet available.
Finally, with the new class loader, the JDBC predefined
UDF can also be simplified.
----
> UDRs need the ability to define a CLASSPATH or similar concept
> --------------------------------------------------------------
>
> Key: TRAFODION-2534
> URL: https://issues.apache.org/jira/browse/TRAFODION-2534
> Project: Apache Trafodion
> Issue Type: Improvement
> Components: sql-general
> Affects Versions: 2.0-incubating
> Reporter: Hans Zeller
> Assignee: Hans Zeller
>
> Right now, Java UDRs can only load classes from their own library (a jar
> file). In many cases, we need to be able to load additional classes. The
> current solution is to unpack all the jars in a single directory, then create
> a single jar with all the needed files in it and register that as the
> library. It works, but is very ugly.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)