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

Richard Ding updated PIG-1479:
------------------------------

    Attachment: PIG-1479_3.patch

Attaching the initial patch that aims to implement the embedding part of the 
above proposal. 

Notes about the patch:

* Pig executes the top-level Jython statements in the script, no need to write 
a main() function.
* You can invoke a Jython script from the command line the same way as you 
invoke a standard Pig script as long as the first line of the script is *#! 
/usr/bin/python*.

Example:

{code}
java -cp jython.jar:pig.jar myscript.py
{code} 

* The run method on ScriptEngine returns a Map<String, PigStats>,  with one 
entry for each runtime Pig pipeline. For named pipeline, the map key is the 
given pipeline name.
* The proposed API is implemented in two classes: _ScriptPigServer_ and 
_PigPipeline_.
* The _compile_ method now is a no-op, will be implemented later.



> Embed Pig in scripting languages
> --------------------------------
>
>                 Key: PIG-1479
>                 URL: https://issues.apache.org/jira/browse/PIG-1479
>             Project: Pig
>          Issue Type: New Feature
>            Reporter: Julien Le Dem
>            Assignee: Richard Ding
>             Fix For: 0.9.0
>
>         Attachments: PIG-1479.patch, PIG-1479_2.patch, PIG-1479_3.patch, 
> pig-greek-test.tar, pig-greek-test.tar, pig-greek.tgz
>
>
> It should be possible to embed Pig calls in a scripting language and let 
> functions defined in the same script available as UDFs.
> This is a spin off of https://issues.apache.org/jira/browse/PIG-928 which 
> lets users define UDFs in scripting languages.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to