[ 
https://issues.apache.org/jira/browse/PIG-4976?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15506435#comment-15506435
 ] 

Nandor Kollar commented on PIG-4976:
------------------------------------

Ok, so in this case it seems that the file is not getting created in 
FileOutputHandler:
        File file = new File(this.fileName);
        BufferedPositionedInputStream fileInStream = 
            new BufferedPositionedInputStream(new FileInputStream(file)); 
This won't create the file, I added a test to show this problem, created a 
patch based on PIG-4976-3.patch (PIG-4976-4.patch) with an additional test for 
this case and changes FileOutputHandler to create the output file. I'm not sure 
what we should do if the output file exist, should we just append to it, or we 
should throw an exception instead?

> streaming job with store clause stuck if the script fail
> --------------------------------------------------------
>
>                 Key: PIG-4976
>                 URL: https://issues.apache.org/jira/browse/PIG-4976
>             Project: Pig
>          Issue Type: Bug
>          Components: impl
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: 0.17.0
>
>         Attachments: PIG-4976-1.patch, PIG-4976-2.patch, PIG-4976-3.patch
>
>
> When investigating PIG-4972, I also notice Pig job stuck when the perl script 
> have syntax error. This happens if we have output clause in stream 
> specification (means use a file as staging). The bug exist in both Tez and 
> MR, and it is not a regression.
> Here is an example:
> {code}
> define CMD `perl kk.pl` output('foo') ship('kk.pl');
> A = load 'studenttab10k' as (name, age, gpa);
> B = foreach A generate name;
> C = stream B through CMD;
> store C into 'ooo';
> {code}
> kk.pl is any perl script contain a syntax error.



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

Reply via email to