hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "liyunzhang_intel (JIRA)" <>
Subject [jira] [Commented] (HIVE-16600) Refactor SetSparkReducerParallelism#needSetParallelism to enable parallel order by in multi_insert cases
Date Sat, 27 May 2017 04:57:04 GMT


liyunzhang_intel commented on HIVE-16600:

i found that following example does not suit your algorithms
set hive.execution.engine=spark; 
set hive.spark.dynamic.partition.pruning=true;
set hive.exec.reducers.bytes.per.reducer=256;
set hive.optimize.sampling.orderby=true;

explain select * from srcpart join (select * from srcpart_date_hour order by hour) srcpart_date_hour1
on (srcpart.ds = srcpart_date_hour1.ds and = where srcpart_date_hour1.`date`
= '2008-04-08' and srcpart_date_hour1.hour = 11;

the logical plan 

the RS[2] is order which should enable parallel order by. But because SEL[3] has 3 children
(RS[7],SEL[17],SEL[20]) and isMultiInsert is false, this cause RS[2] will not be enabled parallel
order by.

> Refactor SetSparkReducerParallelism#needSetParallelism to enable parallel order by in
multi_insert cases
> --------------------------------------------------------------------------------------------------------
>                 Key: HIVE-16600
>                 URL:
>             Project: Hive
>          Issue Type: Sub-task
>            Reporter: liyunzhang_intel
>            Assignee: liyunzhang_intel
>         Attachments: HIVE-16600.1.patch, HIVE-16600.2.patch, HIVE-16600.3.patch, HIVE-16600.4.patch,
HIVE-16600.5.patch, HIVE-16600.6.patch, HIVE-16600.7.patch, HIVE-16600.8.patch, HIVE-16600.9.patch,
mr.explain, mr.explain.log.HIVE-16600
> {code}
> set hive.exec.reducers.bytes.per.reducer=256;
> set hive.optimize.sampling.orderby=true;
> drop table if exists e1;
> drop table if exists e2;
> create table e1 (key string, value string);
> create table e2 (key string);
> FROM (select key, cast(key as double) as keyD, value from src order by key) a
>     SELECT key, value
>     SELECT key;
> select * from e1;
> select * from e2;
> {code} 
> the parallelism of Sort is 1 even we enable parallel order by("hive.optimize.sampling.orderby"
is set as "true").  This is not reasonable because the parallelism  should be calcuated by
> this is because SetSparkReducerParallelism#needSetParallelism returns false when [children
size of RS|]
is greater than 1.
> in this case, the children size of {{RS[2]}} is two.
> the logical plan of the case
> {code}
>    TS[0]-SEL[1]-RS[2]-SEL[3]-SEL[4]-FS[5]
>                             -SEL[6]-FS[7]
> {code}

This message was sent by Atlassian JIRA

View raw message