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

David Mollitor commented on TEZ-4130:
-------------------------------------

OK, I've been looking at this a bit more.  I think this can be made better here:

https://github.com/apache/tez/blob/ba441c1ca9dac51e20ba8561ed3c4b7b620d9505/tez-mapreduce/src/main/java/org/apache/tez/mapreduce/grouper/TezSplitGrouper.java#L238-L240

{code:java|title=TezSplitGrouper.java}
      if (lengthPerGroup > maxLengthPerGroup) {
        // splits too big to work. Need to override with max size.
        int newDesiredNumSplits = (int)(totalLength/maxLengthPerGroup) + 1;
{code}

So, here the `newDesiredNumSplits` can perhaps be capped so that it is never 
larger than the larger number of tasks a single Tez bucket can support.

{code:java}
int newDesiredNumSplits = Math.min(4000, (int)(totalLength/maxLengthPerGroup) + 
1);
{code}

> Config for max task parallelism in shuffle - 
> tez.shuffle-vertex-manager.max-task-parallelism
> --------------------------------------------------------------------------------------------
>
>                 Key: TEZ-4130
>                 URL: https://issues.apache.org/jira/browse/TEZ-4130
>             Project: Apache Tez
>          Issue Type: Improvement
>            Reporter: László Bodor
>            Assignee: László Bodor
>            Priority: Major
>
> During the investigation of a customer issue, I found that tez generated a 
> dag plan containing >4k tasks. It failed for hive because of bucket number 
> limitations (4k). It can be configured properly, e.g. bigger splits 
> (tez.grouping.min-size), but maybe it would be more convenient for users to 
> config a hard limit for shuffle vertex manager.
> However, I'm not really sure if it's correct to force changing the max task 
> parallelism after split generation already happened (e.g. 
> [HiveSplitGenerator|https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/tez/HiveSplitGenerator.java#L192-L244]):
> https://github.com/apache/tez/blob/master/tez-runtime-library/src/main/java/org/apache/tez/dag/library/vertexmanager/ShuffleVertexManager.java#L477



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to