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

jirapos...@reviews.apache.org commented on PIG-2228:
----------------------------------------------------


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


Patch looks pretty good. 

We also need to collect this feature in the stats (PIG_FEATURE). We can open a 
separate Jira for that.


trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPartialAgg.java
<https://reviews.apache.org/r/1817/#comment4375>

    Do you mean NUM_INPRECS_TO_SAMPLE_SZ_REDUCTION?


- Daniel


On 2011-09-12 23:55:12, Thejas Nair wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/1817/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-09-12 23:55:12)
bq.  
bq.  
bq.  Review request for pig, Daniel Dai and Dmitriy Ryaboy.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  See PIG-2228
bq.  
bq.  
bq.  This addresses bug PIG-2228.
bq.      https://issues.apache.org/jira/browse/PIG-2228
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/src/org/apache/pig/Algebraic.java 1164722 
bq.    trunk/src/org/apache/pig/Main.java 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/CombinerOptimizer.java
 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/MapReduceLauncher.java
 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/PhyPlanSetter.java
 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/mapReduceLayer/plans/EndOfAllInputSetter.java
 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/PhyPlanVisitor.java
 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/plans/PlanPrinter.java
 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POLocalRearrange.java
 1164722 
bq.    
trunk/src/org/apache/pig/backend/hadoop/executionengine/physicalLayer/relationalOperators/POPartialAgg.java
 PRE-CREATION 
bq.    trunk/src/org/apache/pig/data/DefaultTuple.java 1164722 
bq.    trunk/src/org/apache/pig/data/InternalCachedBag.java 1164722 
bq.    trunk/src/org/apache/pig/data/InternalDistinctBag.java 1164722 
bq.    trunk/src/org/apache/pig/data/InternalSortedBag.java 1164722 
bq.    trunk/src/org/apache/pig/data/SelfSpillBag.java PRE-CREATION 
bq.    trunk/src/org/apache/pig/data/SizeUtil.java PRE-CREATION 
bq.    trunk/src/org/apache/pig/data/SortedSpillBag.java 1164722 
bq.    trunk/test/e2e/pig/tests/nightly.conf 1164722 
bq.    trunk/test/org/apache/pig/test/TestDataBag.java 1164722 
bq.    trunk/test/org/apache/pig/test/TestPOPartialAgg.java PRE-CREATION 
bq.    trunk/test/org/apache/pig/test/TestPOPartialAggPlan.java PRE-CREATION 
bq.    trunk/test/org/apache/pig/test/Util.java 1164722 
bq.    trunk/test/org/apache/pig/test/utils/GenPhyOp.java 1164722 
bq.  
bq.  Diff: https://reviews.apache.org/r/1817/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  test-patch 
bq.       [exec] -1 overall.
bq.       [exec]
bq.       [exec]     +1 @author.  The patch does not contain any @author tags.
bq.       [exec]
bq.       [exec]     +1 tests included.  The patch appears to include 21 new or 
modified tests.
bq.       [exec]
bq.       [exec]     +1 javadoc.  The javadoc tool did not generate any warning 
messages.
bq.       [exec]
bq.       [exec]     +1 javac.  The applied patch does not increase the total 
number of javac compiler warnings.
bq.       [exec]
bq.       [exec]     +1 findbugs.  The patch does not introduce any new 
Findbugs warnings.
bq.       [exec]
bq.       [exec]     -1 release audit.  The applied patch generated 461 release 
audit warnings (more than the trunk's current 455 warnings).
bq.  release audit failures are because of jdiff changes
bq.  
bq.  All  unit tests pass, new e2e tests added .
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Thejas
bq.  
bq.



> support partial aggregation in map task
> ---------------------------------------
>
>                 Key: PIG-2228
>                 URL: https://issues.apache.org/jira/browse/PIG-2228
>             Project: Pig
>          Issue Type: Bug
>            Reporter: Thejas M Nair
>            Assignee: Thejas M Nair
>             Fix For: 0.10
>
>         Attachments: PIG-2228.1.patch, PIG-2228.2.patch, PIG-2228.3.patch, 
> PIG-2228.4.patch, PIG-2228.5.patch
>
>
> h3. Introduction
> Pig does (sort based) partial aggregation in map side through the use of 
> combiner. MR serializes the output of map to a buffer, sorts it on the keys, 
> deserializes and passes the values grouped on the keys to combiner phase. The 
> same work of combiner can be done in the map phase itself by using a hash-map 
> on the keys. This hash based (partial) aggregation can be done with or 
> without a combiner phase.
> h3. Benefits
> It will send fewer records to combiner and thereby -
>   * Save on cost of serializing and de-serializing
>   * Save on cost of lock calls on the combiner input buffer. (I have found 
> this to be a significant cost for a query that was doing multiple group-by's 
> in a single MR job. -Thejas) 
>   * The problem of running out of memory in reduce side, for queries like 
> COUNT(distinct col) can be avoided. The OOM issue happens because very large 
> records get created after the combiner run on merged reduce input. In case of 
> combiner, you have no way of telling MR not to combine records in reduce 
> side. The workaround is to disable combiner completely, and the opportunity 
> to reduce map output size is lost.
>   * When the foreach after group-by has both algebraic and non-algebraic 
> functions, or if a bag is being projected, the combiner is not used. This is 
> because the data size reduction in typical cases are not significant enough 
> to justify the additional (de)serialization costs. But hash based aggregation 
> can be used in such cases as well.
>   * It is possible to turn off the in-map combine automatically if there is 
> not enough 'combination' that is taking place to justify the overhead of the 
> in-map combiner. (Idea borrowed from Hive jira.) 
>   * If input data is sorted, it is possible to do efficient map side 
> (partial) aggregation with in-map combiner.
> Design proposal is here - 
> https://cwiki.apache.org/confluence/display/PIG/PigInMapCombinerProposal

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to