[
https://issues.apache.org/jira/browse/PIG-3634?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Cheolsoo Park updated PIG-3634:
-------------------------------
Attachment: PIG-3634-3.patch
Hi all,
Since I had time today, I went ahead update the patch addressing my comments in
the RB. I did not change any logic but reorganized the code as follows-
# Create WeightedRangePartitionerTez under tez package that extends
WeightedRangePartitioner. The new class only overrides the init() method.
# Factor out POLocalRearrangeTezFactory into a separate file.
# Factor out new POPackage() calls with getPackage() method.
# Add SAMPLER to OPER_FEATURE in TezOperator and uncomment markSampler().
# Change RoundRobinPartitioner as follows:
{code}
public class RoundRobinPartitioner extends Partitioner<PigNullableWritable,
Writable> {
private int num = 0;
@Override
public int getPartition(PigNullableWritable key, Writable value, int
numPartitions) {
num = ++num % numPartitions;
return num;
}
}
{code}
You can browse the changes
[here|https://github.com/piaozhexiu/apache-pig/commit/507a04e36e8ea9a16c93cd252447c3a06cafdfa0].
I also verified that-
# ant test-tez passes.
# e2e tests pass.
# ant test-commit -Dhadoopversion=20 -Dexectype=mr passes except
TestExampleGenerator (expected).
We can make further changes in separate jiras if needed. I will commit
"PIG-3634-3.patch" today if there is no objection. I'd like to rebase my skewed
join patch to this. Thanks!
> 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, PIG-3634-2.patch,
> PIG-3634-3.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)