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

Lefty Leverenz commented on HIVE-10793:
---------------------------------------

Doc note:  This changes the default value of 
*hive.mapjoin.optimized.hashtable.wbsize* so the wiki needs to be updated (with 
version information).

* [Configuration Properties -- hive.mapjoin.optimized.hashtable.wbsize | 
https://cwiki.apache.org/confluence/display/Hive/Configuration+Properties#ConfigurationProperties-hive.mapjoin.optimized.hashtable.wbsize]

The patch also makes minor changes to the definitions of 
*hive.mapjoin.hybridgrace.minwbsize* and 
*hive.mapjoin.hybridgrace.minnumpartitions* which do not need any doc changes.

> Hybrid Hybrid Grace Hash Join : Don't allocate all hash table memory upfront
> ----------------------------------------------------------------------------
>
>                 Key: HIVE-10793
>                 URL: https://issues.apache.org/jira/browse/HIVE-10793
>             Project: Hive
>          Issue Type: Bug
>          Components: Hive
>    Affects Versions: 1.2.0
>            Reporter: Mostafa Mokhtar
>            Assignee: Mostafa Mokhtar
>             Fix For: 1.3.0
>
>         Attachments: HIVE-10793.1.patch, HIVE-10793.2.patch
>
>
> HybridHashTableContainer will allocate memory based on estimate, which means 
> if the actual is less than the estimate the allocated memory won't be used.
> Number of partitions is calculated based on estimated data size
> {code}
> numPartitions = calcNumPartitions(memoryThreshold, estimatedTableSize, 
> minNumParts, minWbSize,
>           nwayConf);
> {code}
> Then based on number of partitions writeBufferSize is set
> {code}
> writeBufferSize = (int)(estimatedTableSize / numPartitions);
> {code}
> Each hash partition will allocate 1 WriteBuffer, with no further allocation 
> if the estimate data size is correct.
> Suggested solution is to reduce writeBufferSize by a factor such that only X% 
> of the memory is preallocated.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to