You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Rohini Palaniswamy (JIRA)" <ji...@apache.org> on 2013/02/22 01:38:12 UTC

[jira] [Updated] (PIG-3205) Passing arguments to python script does not work with -f option

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

Rohini Palaniswamy updated PIG-3205:
------------------------------------

    Status: Patch Available  (was: Open)
    
> Passing arguments to python script does not work with -f option
> ---------------------------------------------------------------
>
>                 Key: PIG-3205
>                 URL: https://issues.apache.org/jira/browse/PIG-3205
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: 0.10.1
>            Reporter: Rohini Palaniswamy
>            Assignee: Rohini Palaniswamy
>             Fix For: 0.12
>
>         Attachments: PIG-3205.patch
>
>
> With "pig sample.py arg1 arg2", arguments can be accessed in the embedded python script using sys.argv[]. But not in the case "pig -f sample.py arg1 arg2". 
> In case of ExecMode.FILE, we don't set PigContext.PIG_CMD_ARGS_REMAINDERS and so the arguments are not passed to JythonScriptEngine or GroovyScriptEngine. This is specially a problem with Oozie as it always uses -f option to specify the pig script.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira