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:10:50 UTC

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

     [ https://issues.apache.org/jira/browse/PIG-1513?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Richard Ding updated PIG-1513:
------------------------------

        Summary: Pig doesn't handle empty input directory  (was: Skewed join doesn't handle empty input directory)
    Description: 

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.

  was:

The following script

{code}
A = load 'input';
B = load 'emptydir';
C = join B by $0, A by $0 using 'skewed';
dump C
{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 . 


> 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.