Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hive >> mail # dev >> Re: Review Request: HIVE-2206: add a new optimizer for query correlation discovery and optimization


+
Yin Huai 2012-11-03, 01:50
Copy link to this message
-
Re: Review Request: HIVE-2206: add a new optimizer for query correlation discovery and optimization

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/2001/#review4912
-----------------------------------------------------------
I've started reviewing this, here's my comments so far.  I'll continue to look over it.
trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
<https://reviews.apache.org/r/2001/#comment11010>

    Does this have to default to false, does anything break if it's true?
    
    Similarly, have you tried running the tests with this set to true?

trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CorrelationCompositeOperator.java
<https://reviews.apache.org/r/2001/#comment10818>

    It's not clear to me why we need both setRowNumber and processOp.

trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CorrelationCompositeOperator.java
<https://reviews.apache.org/r/2001/#comment10817>

    Putting this code in a helper method would be better than having it both here and in setRowNumber.

trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CorrelationLocalSimulativeReduceSinkOperator.java
<https://reviews.apache.org/r/2001/#comment10819>

    Does this commented out code need to be kept?

trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java
<https://reviews.apache.org/r/2001/#comment10820>

    I couldn't find a CorrelationFakeReduceSinkOperator class.

trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
<https://reviews.apache.org/r/2001/#comment10821>

    Tabs are bad, could you change them to spaces, at least in the new code your introducing.

trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/CorrelationOptimizer.java
<https://reviews.apache.org/r/2001/#comment10850>

    I take it from this line it's a requirement that in order for this correlation optimization to be attempted every reduce sink has to be followed only by children with a single child.
    
    Could this be relaxed?  Could the optimization simply not be applied if there is an operator between two ReduceSinks that has more than one child?
    
    Also, if there is a ReduceSink which is not followed by another ReduceSink, but is followed by an operator with more than one child, this prevents the optimization from being used, even though it shouldn't have an effect.
    
    Also, regarding checking if the size <=1, if the size <1 the next line will throw an exception.

trunk/ql/src/java/org/apache/hadoop/hive/ql/optimizer/CorrelationOptimizer.java
<https://reviews.apache.org/r/2001/#comment10851>

    findNextChildReduceSinkOperator can return null, do you need to check for this?
- Kevin
On 2012-01-29 17:56:48, Yin Huai wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/2001/
> -----------------------------------------------------------
>
> (Updated 2012-01-29 17:56:48)
>
>
> Review request for hive.
>
>
> Summary
> -------
>
> This optimizer exploits intra-query correlations and merges multiple correlated MapReduce jobs into one jobs.
>
>
> This addresses bug HIVE-2206.
>     https://issues.apache.org/jira/browse/HIVE-2206
>
>
> Diffs
> -----
>
>   trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 1237326
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/BaseReduceSinkOperator.java PRE-CREATION
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CorrelationCompositeOperator.java PRE-CREATION
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CorrelationLocalSimulativeReduceSinkOperator.java PRE-CREATION
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/CorrelationReducerDispatchOperator.java PRE-CREATION
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/ExecReducer.java 1237326
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/Operator.java 1237326
>   trunk/ql/src/java/org/apache/hadoop/hive/ql/exec/OperatorFactory.java 1237326
+
Yin Huai 2012-02-10, 19:11
+
Yin Huai 2012-02-10, 20:49