Matthew Hayes created PIG-2850:
----------------------------------
Summary: Pig should support loading macro files as resources
stored in JAR files
Key: PIG-2850
URL: https://issues.apache.org/jira/browse/PIG-2850
Project: Pig
Issue Type: Improvement
Reporter: Matthew Hayes
Priority: Minor
Attachments: import_macros_from_jar.diff
A file containing macros can be imported in pig like so:
{code}
IMPORT 'some_path/my_macros.pig';
{code}
It would be convenient if a macro file could be imported from a registered JAR
as well. This would make it easier to distribute them. One could package a
set of UDFs and macros in a single JAR. Once the JAR is registered any of the
UDFs or macros can be used once.
For example, support that {{some_path/my_macros.pig}} has been packaged in a
JAR named {{my_macros.jar}}. The above code then becomes
{code}
REGISTER my_macros.jar;
IMPORT 'some_path/my_macros.pig';
{code}
Pig would first check if the file is found at the path
{{some_path/my_macros.pig}}, and failing that it would attempt to load a
resource by that name. Since the JAR is registered it will find it.
--
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