You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ning Zhang (JIRA)" <ji...@apache.org> on 2009/09/01 06:57:32 UTC

[jira] Commented: (HIVE-790) race condition related to ScriptOperator + UnionOperator

    [ https://issues.apache.org/jira/browse/HIVE-790?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12749757#action_12749757 ] 

Ning Zhang commented on HIVE-790:
---------------------------------

Tested performance on a larger data set: the base table is 47 million rows of ad_imps_2 with compressed storage of 89MB. The query is 

insert overwrite table Tmp select * from (select * from Base union all select * from Base) s;

With synchronized UnionOperator.processOp(), mapper 1 got average time of 476.05 secs, mapper2 average time = 648.5 secs
With non-sync UnionOperator.processOp(), mapper 1 average = 476.34 secs, mapper2 average time = 655.117 sec. 

The union operator is executed in mapper 1 and there is almost no difference by introducing the synchronized keyword. So no new JIRA is needed for performance regression.

> race condition related to ScriptOperator + UnionOperator
> --------------------------------------------------------
>
>                 Key: HIVE-790
>                 URL: https://issues.apache.org/jira/browse/HIVE-790
>             Project: Hadoop Hive
>          Issue Type: Bug
>            Reporter: Zheng Shao
>            Assignee: Ning Zhang
>         Attachments: Hive-790.patch, Hive-790_2.patch, Hive-790_3.patch, Hive-790_4.patch
>
>
> ScriptOperator uses a second thread to output the rows to the children operators. In a corner case which contains a union, 2 threads might be outputting data into the same operator hierarchy and caused race conditions.
> {code}
> CREATE TABLE tablea (cola STRING);
> SELECT *
> FROM (
>     SELECT TRANSFORM(cola)
>     USING 'cat'
>     AS cola
>     FROM tablea
>   UNION ALL
>     SELECT cola as cola
>     FROM tablea
> ) a;
> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.