hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Janos Gub (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-17344) LocalCache element memory usage is not calculated properly.
Date Thu, 17 Aug 2017 11:35:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-17344?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Janos Gub updated HIVE-17344:
-----------------------------
    Description: 
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
have elements MAXWEIGHT/100 of arbitrary size. I think the correct solution would be bb.capacity.

  was:
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 MAXWEIGHT/100. I think the correct solution would be bb.capacity.


> 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
>         Attachments: HIVE-17344.patch
>
>
> 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 have elements MAXWEIGHT/100 of arbitrary size. I think the correct solution would be
bb.capacity.



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

Mime
View raw message