You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Richard Ding (JIRA)" <ji...@apache.org> on 2010/07/23 00:28:50 UTC

[jira] Commented: (PIG-1513) Pig doesn't handle empty input directory

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

Richard Ding commented on PIG-1513:
-----------------------------------

Changed the JIRA title to deal with general problem of empty input directory handling.

> Pig doesn't handle empty input directory
> ----------------------------------------
>
>                 Key: PIG-1513
>                 URL: https://issues.apache.org/jira/browse/PIG-1513
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Richard Ding
>            Assignee: Richard Ding
>             Fix For: 0.8.0
>
>
> The following script
> {code}
> A = load 'input';
> B = load 'emptydir';
> C = join B by $0, A by $0 using 'skewed';
> store C into 'output';
> {code}
> fails with "ERROR: java.lang.RuntimeException: Empty samples file';
> In this case, the sample job has 0 maps.  Pig doesn't expect this and fails . 
> For merge join the script
> The merge join script
> {code}
> A = load 'input';
> B = load 'emptydir';
> C = join A by $0, B by $0 using 'merge';
> store C into 'output';
> {code}
> the sample job again has 0 maps and the script  fails with " ERROR 2176: Error processing right input during merge join".
> But if we change the join order: 
> {code}
> A = load 'input';
> B = load 'emptydir';
> C = join B by $0, A by $0 using 'merge';
> store C into 'output';
> {code}
> The second job (merge) now has 0 maps and 0 reduces. And it generates an empty 'output' directory.
> Order by on empty directory works fine and generates empty part files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.