[ https://issues.apache.org/jira/browse/PIG-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893744#action_12893744 ]
Richard Ding commented on PIG-1513: ----------------------------------- Manually ran and passed all core tests. > 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 > > Attachments: PIG-1513.patch > > > 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.