[
https://issues.apache.org/jira/browse/PIG-412?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Olga Natkovich updated PIG-412:
-------------------------------
Priority: Minor (was: Major)
> On failure streaming does not store stderr to specified error log file
> ----------------------------------------------------------------------
>
> Key: PIG-412
> URL: https://issues.apache.org/jira/browse/PIG-412
> Project: Pig
> Issue Type: Bug
> Affects Versions: types_branch
> Reporter: Pradeep Kamath
> Assignee: Pradeep Kamath
> Priority: Minor
> Fix For: types_branch
>
>
> script:
> {code}
> define CMD `perl DieRandomly.pl 10000 2`
> ship('/home/pradeep/pigtest/DieRandomly.pl') stderr('CMD' limit 1);
> A = load '/user/pig/tests/data/singlefile/studenttab10k';
> B = stream A through CMD;
> store B into
> '/user/pig/tests/results/pradeepk.1220400366/StreamingErrors_4.out'
> {code}
> DieRandomly.pl code:
> {code}
> #!/usr/bin/perl
> use strict;
> use warnings;
> if(scalar(@ARGV) != 2) {
> die "Usage: $0 <number of lines in input> <exit code>";
> }
> my $numInputLines = shift;
> my $exitCode = shift;
> my $terminateAt = int(rand($numInputLines));
> my $i = 0;
> while(<STDIN>) {
> $i++;
> if($i == $terminateAt) {
> exit($exitCode);
> }
> }
> {code}
> The above pig script fails correctly due to the non zero exit code from the
> streaming script. However it does not result in the stderr messages going to
> CMD directory under _logs of the output directory. The stderr messages
> include the standard header and footer messages which are emitted for all
> streaming tasks
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.