You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "Wilfred Spiegelenburg (JIRA)" <ji...@apache.org> on 2014/11/20 11:36:33 UTC

[jira] [Updated] (HADOOP-11323) WritableComparator: default implementation of compare keeps reference to byte array

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

Wilfred Spiegelenburg updated HADOOP-11323:
-------------------------------------------
    Attachment: HADOOP-11323.patch

> WritableComparator: default implementation of compare keeps reference to byte array
> -----------------------------------------------------------------------------------
>
>                 Key: HADOOP-11323
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11323
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: performance
>    Affects Versions: 2.5.0
>            Reporter: Wilfred Spiegelenburg
>         Attachments: HADOOP-11323.patch
>
>
> When the default compare is used on a WritableComparator a reference to the second passed in byte array is kept in the buffer. Since WritableComparator keeps a reference to the buffer the byte will never be garbage collected. This can lead to a higher heap use than needed.
> The buffer should drop the reference to the byte array passed in. We can null out the byte array reference since the buffer is a private variable for the class.



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