You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Cheolsoo Park (JIRA)" <ji...@apache.org> on 2013/12/29 06:39:51 UTC

[jira] [Commented] (PIG-3634) Improve performance of order-by

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

Cheolsoo Park commented on PIG-3634:
------------------------------------

[~daijy], I am seeing an error with your patch when running this query-
{code}
a = load '/user/pig/tests/data/singlefile/studenttab10k' as (name:chararray, age:int, gpa:double);
b = order a by age parallel 2;
dump b;
{code}
I updated Tez to the latest, so that shouldn't be a problem. It looks like your patch is not compatible with the HEAD of tez branch.

Here is the stack trace-
{code}
: Caused by: java.lang.ClassCastException: org.apache.pig.impl.io.NullableBytesWritable cannot be cast to org.apache.pig.impl.io.NullableText
: at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigTextRawComparator.compare(PigTextRawComparator.java:86)
: at org.apache.pig.backend.hadoop.executionengine.tez.POShuffleTezLoad.getNextTuple(POShuffleTezLoad.java:142)
: at org.apache.pig.backend.hadoop.executionengine.physicalLayer.PhysicalOperator.processInput(PhysicalOperator.java:296)
: at org.apache.pig.backend.hadoop.executionengine.physicalLayer.relationalOperators.POForEach.getNextTuple(POForEach.java:242)
{code}

> Improve performance of order-by
> -------------------------------
>
>                 Key: PIG-3634
>                 URL: https://issues.apache.org/jira/browse/PIG-3634
>             Project: Pig
>          Issue Type: Sub-task
>          Components: tez
>            Reporter: Daniel Dai
>            Assignee: Daniel Dai
>             Fix For: tez-branch
>
>         Attachments: PIG-3634-0.patch, PIG-3634-1.patch
>
>
> This is a followup for PIG-3534. In PIG-3534, we use 5 vertexes (3 DAGs) to implement an order-by. We can optimize to use 4 vertexes in 1 DAG:
> vertex 1: close the current vertex, create input + samples input
> vertex 2: aggregate samples to create quantiles
> vertex 3: use quantiles to partition input
> vertex 4: sort input after partition
> The DAG is:
> {code}
> vertex 1   ------------------>  vertex 3 ------> vertex 4
>            \--> vertex 2 ---/
> {code}



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)