Return-Path: X-Original-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Delivered-To: apmail-hadoop-common-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5AA4F10722 for ; Fri, 21 Nov 2014 15:45:35 +0000 (UTC) Received: (qmail 8350 invoked by uid 500); 21 Nov 2014 15:45:35 -0000 Delivered-To: apmail-hadoop-common-issues-archive@hadoop.apache.org Received: (qmail 8304 invoked by uid 500); 21 Nov 2014 15:45:35 -0000 Mailing-List: contact common-issues-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-issues@hadoop.apache.org Delivered-To: mailing list common-issues@hadoop.apache.org Received: (qmail 8290 invoked by uid 99); 21 Nov 2014 15:45:35 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Nov 2014 15:45:35 +0000 Date: Fri, 21 Nov 2014 15:45:34 +0000 (UTC) From: "Hudson (JIRA)" To: common-issues@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HADOOP-11323) WritableComparator#compare keeps reference to byte array MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HADOOP-11323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14221050#comment-14221050 ] Hudson commented on HADOOP-11323: --------------------------------- SUCCESS: Integrated in Hadoop-Mapreduce-trunk-Java8 #12 (See [https://builds.apache.org/job/Hadoop-Mapreduce-trunk-Java8/12/]) HADOOP-11323. WritableComparator#compare keeps reference to byte array. Contributed by Wilfred Spiegelenburg. (wang: rev eb4045e7652be6ceaf9dfd33e9139d67774b99ab) * hadoop-common-project/hadoop-common/CHANGES.txt * hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/io/WritableComparator.java > WritableComparator#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 > Assignee: Wilfred Spiegelenburg > Fix For: 2.7.0 > > 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)