You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Janos Gub (JIRA)" <ji...@apache.org> on 2017/08/17 11:01:00 UTC

[jira] [Created] (HIVE-17344) LocalCache element memory usage is not calculated properly.

Janos Gub created HIVE-17344:
--------------------------------

             Summary: LocalCache element memory usage is not calculated properly.
                 Key: HIVE-17344
                 URL: https://issues.apache.org/jira/browse/HIVE-17344
             Project: Hive
          Issue Type: Bug
            Reporter: Janos Gub
            Assignee: Janos Gub


Orc footer cache has a calculation of memory usage:
{code:java}
public int getMemoryUsage() {
  return bb.remaining() + 100; // 100 is for 2 longs, BB and java overheads (semi-arbitrary).
}
{code}

ByteBuffer.remaining returns the remaining space in the bytebuffer, thus allowing this cache to grow until MAXSIZE/100. I think the correct solution would be bb.capacity.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)