You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Koji Noguchi (JIRA)" <ji...@apache.org> on 2016/05/18 22:10:13 UTC

[jira] [Updated] (PIG-4897) Scope of param substitution for run/exec commands

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

Koji Noguchi updated PIG-4897:
------------------------------
    Attachment: pig-4897-v01-notestyet.patch

Attaching a patch that reverts part of PIG-3359 and make 'run/exec command' NOT to share the param substitution variables outside.

This would be considered a "Incompatible change" if any users were depending on this param sharing among run/exec-ed scripts.

I'll add a testcase tomorrow but I'm still not sure if this is a right approach.

> Scope of param substitution for run/exec commands
> -------------------------------------------------
>
>                 Key: PIG-4897
>                 URL: https://issues.apache.org/jira/browse/PIG-4897
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Koji Noguchi
>            Assignee: Koji Noguchi
>         Attachments: pig-4897-v01-notestyet.patch
>
>
> After PIG-3359, pig param substitution became global in that parameter declared in the pig script called from {{run}} or {{exec}} would live after that script finishes.  
> This created an interesting situation.
> {code:title=test1.pig}
> exec -param output=/tmp/deleteme111 test1_1.pig
> exec -param output=/tmp/deleteme222 test1_1.pig
> {code}
> {code:title=test1_1.pig}
> %default myout '$output.out';
> A = load 'input.txt' as (a0:int);
> store A into '$myout';
> {code}
> Running {{test1.pig}} would try to run two jobs that both tries to write to /tmp/deleteme111 and fail.  (Second param output=/tmp/deleteme222 is ignored.)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)