Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
My pig script:
define CMD `perl PigStreamingBad.pl end` ship('PigStreamingBad.pl') stderr('CMD' limit 1);
A = load 'studenttab10k';
B = stream A through CMD;
store B into 'out';
My perl script:
use strict;
- This script is used to test streaming error cases in pig.
- Usage: PigStreaming.pl <start|middle|end>
- the parameter tells the application when to exit with error
if ($#ARGV < 0)
{
print STDERR "Usage PigStreaming.pl <start|middle|end>\n";
exit (-1);
}
my $pos = $ARGV[0];
if ($pos eq "start")
{
print STDERR "Failed in the beginning of the processing\n";
exit(1);
}
print STDERR "PigStreamingBad.pl: starting processing\n";
my $cnt = 0;
while (<STDIN>)
{
print "$_";
$cnt++;
print STDERR "PigStreaming.pl: processing $_\n";
if (($cnt > 100) && ($pos eq "middle"))
}
print STDERR "Failed at the end of processing\n";
exit(3);