You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Dmitriy V. Ryaboy (JIRA)" <ji...@apache.org> on 2012/08/24 04:55:43 UTC

[jira] [Assigned] (PIG-2850) Pig should support loading macro files as resources stored in JAR files

     [ https://issues.apache.org/jira/browse/PIG-2850?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dmitriy V. Ryaboy reassigned PIG-2850:
--------------------------------------

    Assignee: Matthew Hayes
    
> 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
>            Assignee: Matthew Hayes
>            Priority: Minor
>         Attachments: import_macros_from_jar_2.diff, import_macros_from_jar_3.diff, import_macros_from_jar_4.diff, import_macros_from_jar_5.diff, 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