[
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-v04.patch
{quote}
Makes sense to have scope for run/exec. Anything defined in the main script is
always applicable, but those introduced in the run/exec scripts are scoped and
only apply or override the main settings during its execution.
{quote}
Thanks Rohini. Attaching {{pig-4897-v04.patch}} that would add the scope for
run/exec calls.
Now the patch matches with what the description says, "Scope of param
substitution for run/exec commands".
In addition to this scope change, I also took out one public constructor which
seemed not used anywhere.
{code}
public PreprocessorContext(Map<String, String> paramVal)
{code}
> 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, pig-4897-v02.patch,
> pig-4897-v03.patch, pig-4897-v04.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)