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-2.patch
        6 kB
        Daniel Dai
      2. PIG-894-1.patch
        5 kB
        Daniel Dai

        Activity

        Thejas M Nair created issue -
        Daniel Dai made changes -
        Field Original Value New Value
        Attachment PIG-894-1.patch [ 12421681 ]
        Daniel Dai made changes -
        Assignee Daniel Dai [ daijy ]
        Daniel Dai made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Daniel Dai made changes -
        Attachment PIG-894-2.patch [ 12421694 ]
        Daniel Dai made changes -
        Status Patch Available [ 10002 ] Open [ 1 ]
        Daniel Dai made changes -
        Status Open [ 1 ] Patch Available [ 10002 ]
        Affects Version/s 0.4.0 [ 12314042 ]
        Fix Version/s 0.6.0 [ 12314214 ]
        Daniel Dai made changes -
        Status Patch Available [ 10002 ] Resolved [ 5 ]
        Hadoop Flags [Reviewed]
        Resolution Fixed [ 1 ]
        Alan Gates made changes -
        Status Resolved [ 5 ] Closed [ 6 ]

          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