Pig
  1. Pig
  2. PIG-894

order-by fails when input is empty

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.4.0
    • Fix Version/s: 0.6.0
    • Component/s: None
    • Labels:
      None
    • Hadoop Flags:
      Reviewed

      Description

      grunt> l = load 'students.txt' ;
      grunt> f = filter l by 1 == 2;
      grunt> o = order f by $0 ;
      grunt> dump o;

      This results in 3 MR jobs . The 2nd (sampling) MR creates empty sample file, and 3rd MR (order-by) fails with following error in Map job -

      java.lang.RuntimeException: java.lang.RuntimeException: Empty samples file
      at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.partitioners.WeightedRangePartitioner.configure(WeightedRangePartitioner.java:104)
      at org.apache.hadoop.util.ReflectionUtils.setConf(ReflectionUtils.java:58)
      at org.apache.hadoop.util.ReflectionUtils.newInstance(ReflectionUtils.java:82)
      at org.apache.hadoop.mapred.MapTask$MapOutputBuffer.(MapTask.java:348)
      at org.apache.hadoop.mapred.MapTask.run(MapTask.java:193)
      at org.apache.hadoop.mapred.TaskTracker$Child.main(TaskTracker.java:2207)
      Caused by: java.lang.RuntimeException: Empty samples file
      at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.partitioners.WeightedRangePartitioner.configure(WeightedRangePartitioner.java:89)
      ... 5 more

      1. PIG-894-1.patch
        5 kB
        Daniel Dai
      2. PIG-894-2.patch
        6 kB
        Daniel Dai

        Activity

        Hide
        Daniel Dai added a comment -

        Patch committed.

        Show
        Daniel Dai added a comment - Patch committed.
        Hide
        Pradeep Kamath added a comment -

        +1 to new patch

        Show
        Pradeep Kamath added a comment - +1 to new patch
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12421694/PIG-894-2.patch
        against trunk revision 823257.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/17/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/17/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/17/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12421694/PIG-894-2.patch against trunk revision 823257. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/17/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/17/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/17/console This message is automatically generated.
        Hide
        Hadoop QA added a comment -

        +1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12421681/PIG-894-1.patch
        against trunk revision 823257.

        +1 @author. The patch does not contain any @author tags.

        +1 tests included. The patch appears to include 3 new or modified tests.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/16/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/16/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/16/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - +1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12421681/PIG-894-1.patch against trunk revision 823257. +1 @author. The patch does not contain any @author tags. +1 tests included. The patch appears to include 3 new or modified tests. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/16/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/16/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Console output: http://hudson.zones.apache.org/hudson/job/Pig-Patch-h8.grid.sp2.yahoo.net/16/console This message is automatically generated.
        Hide
        Daniel Dai added a comment -

        Fix the issue Pradeep find.

        Show
        Daniel Dai added a comment - Fix the issue Pradeep find.
        Hide
        Pradeep Kamath added a comment -

        The patch uses pig.inputs property from jobconf which does not directly have the input file name - it actually has a serialized arrayList<Pair<FileSpec, Boolean>> in string form containing the filespec and the issplittable flag for each input for the job - this serialized string will need to be deserialized using ObjectSerializer.deserialize and then from the filespec, the filename will need to be retrieved.

        Show
        Pradeep Kamath added a comment - The patch uses pig.inputs property from jobconf which does not directly have the input file name - it actually has a serialized arrayList<Pair<FileSpec, Boolean>> in string form containing the filespec and the issplittable flag for each input for the job - this serialized string will need to be deserialized using ObjectSerializer.deserialize and then from the filespec, the filename will need to be retrieved.
        Hide
        Ankur added a comment -

        Is empty inputs referring to relation - l ('students.txt') or f (filter l by 1 == 2). I am seeing a similar issue where the sampler produces an empty file when the number of records in the relation being sorted in too low ( < 4 ).

        Show
        Ankur added a comment - Is empty inputs referring to relation - l ('students.txt') or f (filter l by 1 == 2). I am seeing a similar issue where the sampler produces an empty file when the number of records in the relation being sorted in too low ( < 4 ).

          People

          • Assignee:
            Daniel Dai
            Reporter:
            Thejas M Nair
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development