[ 
https://issues.apache.org/jira/browse/HIVE-23843?focusedWorklogId=461374&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-461374
 ]

ASF GitHub Bot logged work on HIVE-23843:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 21/Jul/20 02:07
            Start Date: 21/Jul/20 02:07
    Worklog Time Spent: 10m 
      Work Description: rbalamohan commented on a change in pull request #1250:
URL: https://github.com/apache/hive/pull/1250#discussion_r457792912



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorGroupByOperator.java
##########
@@ -358,6 +360,34 @@ public void close(boolean aborted) throws HiveException {
      */
     private long numRowsCompareHashAggr;
 
+    /**
+     * To track current memory usage.
+     */
+    private long currMemUsed;
+
+    /**
+     * Whether to make use of LRUCache for map aggr buffers or not.
+     */
+    private boolean lruCache;
+
+    class LRUCache extends LinkedHashMap<KeyWrapper, 
VectorAggregationBufferRow> {

Review comment:
       LinkedHashMap provides this semantics and already maintains the double 
linked list internally. Invokes removeEldestEntry on need basis.  However, 
planning to make it a lot more simpler in next iteration of the patch.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 461374)
    Time Spent: 1h  (was: 50m)

> Improve key evictions in VectorGroupByOperator
> ----------------------------------------------
>
>                 Key: HIVE-23843
>                 URL: https://issues.apache.org/jira/browse/HIVE-23843
>             Project: Hive
>          Issue Type: Improvement
>          Components: Hive
>            Reporter: Rajesh Balamohan
>            Assignee: Rajesh Balamohan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 1h
>  Remaining Estimate: 0h
>
> Keys in {{mapKeysAggregationBuffers}} are evicted in random order. Tasks also 
> get into GC issues when multiple keys are involved in groupbys. It would be 
> good to provide an option to have LRU based eviction for 
> mapKeysAggregationBuffers.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to