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



---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org
For additional commands, e-mail: gitbox-h...@hive.apache.org

Reply via email to