[
https://issues.apache.org/jira/browse/PIG-11?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12540074
]
Antonio Magnaghi commented on PIG-11:
-------------------------------------
Olga,
I am looking into a fix for this. Can you please assign this bug to me?
One possible implementation could be:
1.) if the user passes an absolute path to the jar to register, look for that
file (irrespective of the CLASSPATH) and if we fail to locate the jar, just
fail.
2.) if the user does not pass an absolute path, do a sequencial search on each
element in CLASSPATH (for those elements in CLASSPATH that are not jar's):
append the user passed path to CLASSPATH elements and see if we can locate the
jar. We stop the search the first time we have a match. If we don't find any
match, we fail.
As for the search in the local directory first, there are two possible
approaches:
- on one side if the user wants to search in the local directory first, he/she
should set the current directory (".") at the very beginning of the CLASSPATH.
- on the other side, one can say that expecting the CLASSPATH to contain the
current directory as a prefix may be not compatible with what current users
expect. I.e. they expect the search to start with the current local dir. So we
could preserve that.
Thanks,
-a.
> Pig command - add search path for UDF .jar files
> ------------------------------------------------
>
> Key: PIG-11
> URL: https://issues.apache.org/jira/browse/PIG-11
> Project: Pig
> Issue Type: Improvement
> Components: impl
> Reporter: Olga Natkovich
> Priority: Minor
>
> Add a mechanism so that invocations of:
> register my.jar;
> will search not only the local directory but a set of paths. This could
> simply be classpath.
> This will permit users to have build trees of UDFs that commonly share
> across different piglets
> without having to copy the jar locally to each directory and without
> having to use absolute
> pathnames to refer to the files.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.