You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Sergio Pena <se...@cloudera.com> on 2016/11/23 20:02:37 UTC

Review Request 54042: HIVE-15114: Remove extra MoveTask operators from the ConditionalTask

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54042/
-----------------------------------------------------------

Review request for hive.


Bugs: HIVE-15114
    https://issues.apache.org/jira/browse/HIVE-15114


Repository: hive-git


Description
-------

This patch removes an extra MoveTask from the CONDITIONAL TASK added to the query plan. It would be used only as a Blobstorage optimization. 
In HDFS, this two tasks are just simple atomic renames, but on Blobstorage, a rename is too expensive.


Diffs (updated)
-----

  itests/hive-blobstore/src/test/queries/clientpositive/conditional_task_optimization.q PRE-CREATION 
  itests/hive-blobstore/src/test/results/clientpositive/conditional_task_optimization.q.out PRE-CREATION 
  itests/hive-blobstore/src/test/results/clientpositive/insert_into.q.out 00ad136ae40a5ed2689ad8ed2f882bbcd238324d 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java 88d5afadd690c3dce276b72a37608d30ddeea271 
  ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java PRE-CREATION 

Diff: https://reviews.apache.org/r/54042/diff/


Testing (updated)
-------

# Testa added
mvn test -Dtest=TestBlobstoreCliDriver -Dqfile=conditional_task_optimization.q

# All tests
mvn test -Dtest=TestBlobstoreCliDriver
mvn test -Dtest=TestBlobstoreNegativeCliDriver


Thanks,

Sergio Pena


Re: Review Request 54042: HIVE-15114: Remove extra MoveTask operators from the ConditionalTask

Posted by Sergio Pena <se...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54042/
-----------------------------------------------------------

(Updated Nov. 28, 2016, 9:52 p.m.)


Review request for hive.


Bugs: HIVE-15114
    https://issues.apache.org/jira/browse/HIVE-15114


Repository: hive-git


Description
-------

This patch removes an extra MoveTask from the CONDITIONAL TASK added to the query plan. It would be used only as a Blobstorage optimization. 
In HDFS, this two tasks are just simple atomic renames, but on Blobstorage, a rename is too expensive.


Diffs (updated)
-----

  itests/hive-blobstore/src/test/queries/clientpositive/conditional_task_optimization.q PRE-CREATION 
  itests/hive-blobstore/src/test/results/clientpositive/conditional_task_optimization.q.out PRE-CREATION 
  itests/hive-blobstore/src/test/results/clientpositive/insert_into.q.out 00ad136ae40a5ed2689ad8ed2f882bbcd238324d 
  ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java 88d5afadd690c3dce276b72a37608d30ddeea271 
  ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java PRE-CREATION 

Diff: https://reviews.apache.org/r/54042/diff/


Testing
-------

# Testa added
mvn test -Dtest=TestBlobstoreCliDriver -Dqfile=conditional_task_optimization.q

# All tests
mvn test -Dtest=TestBlobstoreCliDriver
mvn test -Dtest=TestBlobstoreNegativeCliDriver


Thanks,

Sergio Pena


Re: Review Request 54042: HIVE-15114: Remove extra MoveTask operators from the ConditionalTask

Posted by Aihua Xu <ax...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54042/#review156792
-----------------------------------------------------------




ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java (line 1465)
<https://reviews.apache.org/r/54042/#comment227087>

    You need to make sure task1 and task2 are both moving file or table. Right now, seems task1 can be file and task2 can be table.



ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java (line 1539)
<https://reviews.apache.org/r/54042/#comment227089>

    Seems again you need make sure both are MoveFile or MoveTable.


- Aihua Xu


On Nov. 23, 2016, 8:02 p.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54042/
> -----------------------------------------------------------
> 
> (Updated Nov. 23, 2016, 8:02 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-15114
>     https://issues.apache.org/jira/browse/HIVE-15114
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> This patch removes an extra MoveTask from the CONDITIONAL TASK added to the query plan. It would be used only as a Blobstorage optimization. 
> In HDFS, this two tasks are just simple atomic renames, but on Blobstorage, a rename is too expensive.
> 
> 
> Diffs
> -----
> 
>   itests/hive-blobstore/src/test/queries/clientpositive/conditional_task_optimization.q PRE-CREATION 
>   itests/hive-blobstore/src/test/results/clientpositive/conditional_task_optimization.q.out PRE-CREATION 
>   itests/hive-blobstore/src/test/results/clientpositive/insert_into.q.out 00ad136ae40a5ed2689ad8ed2f882bbcd238324d 
>   ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java 88d5afadd690c3dce276b72a37608d30ddeea271 
>   ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/54042/diff/
> 
> 
> Testing
> -------
> 
> # Testa added
> mvn test -Dtest=TestBlobstoreCliDriver -Dqfile=conditional_task_optimization.q
> 
> # All tests
> mvn test -Dtest=TestBlobstoreCliDriver
> mvn test -Dtest=TestBlobstoreNegativeCliDriver
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>


Re: Review Request 54042: HIVE-15114: Remove extra MoveTask operators from the ConditionalTask

Posted by Sergio Pena <se...@cloudera.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/54042/#review156798
-----------------------------------------------------------




ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java (line 1465)
<https://reviews.apache.org/r/54042/#comment227096>

    File or table is just how the MoveTask will handle the destination. In both cases, the MoveTask gets the destination directory and it moves the data to it.
    
    In a normal conditional task, MoveTask1 moves to a directory followed by a MoveTask2 that moves to a table directory.
    
    With the patch, MoveTask1 moves to a table directory directly.
    
    Do you see any problem with that merge approach?


- Sergio Pena


On Nov. 23, 2016, 8:02 p.m., Sergio Pena wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/54042/
> -----------------------------------------------------------
> 
> (Updated Nov. 23, 2016, 8:02 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-15114
>     https://issues.apache.org/jira/browse/HIVE-15114
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> This patch removes an extra MoveTask from the CONDITIONAL TASK added to the query plan. It would be used only as a Blobstorage optimization. 
> In HDFS, this two tasks are just simple atomic renames, but on Blobstorage, a rename is too expensive.
> 
> 
> Diffs
> -----
> 
>   itests/hive-blobstore/src/test/queries/clientpositive/conditional_task_optimization.q PRE-CREATION 
>   itests/hive-blobstore/src/test/results/clientpositive/conditional_task_optimization.q.out PRE-CREATION 
>   itests/hive-blobstore/src/test/results/clientpositive/insert_into.q.out 00ad136ae40a5ed2689ad8ed2f882bbcd238324d 
>   ql/src/java/org/apache/hadoop/hive/ql/optimizer/GenMapRedUtils.java 88d5afadd690c3dce276b72a37608d30ddeea271 
>   ql/src/test/org/apache/hadoop/hive/ql/optimizer/TestGenMapRedUtilsCreateConditionalTask.java PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/54042/diff/
> 
> 
> Testing
> -------
> 
> # Testa added
> mvn test -Dtest=TestBlobstoreCliDriver -Dqfile=conditional_task_optimization.q
> 
> # All tests
> mvn test -Dtest=TestBlobstoreCliDriver
> mvn test -Dtest=TestBlobstoreNegativeCliDriver
> 
> 
> Thanks,
> 
> Sergio Pena
> 
>