Return-Path: Delivered-To: apmail-hadoop-core-dev-archive@www.apache.org Received: (qmail 83736 invoked from network); 15 Jul 2008 00:00:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Jul 2008 00:00:24 -0000 Received: (qmail 43553 invoked by uid 500); 15 Jul 2008 00:00:22 -0000 Delivered-To: apmail-hadoop-core-dev-archive@hadoop.apache.org Received: (qmail 43520 invoked by uid 500); 15 Jul 2008 00:00:22 -0000 Mailing-List: contact core-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: core-dev@hadoop.apache.org Delivered-To: mailing list core-dev@hadoop.apache.org Received: (qmail 43500 invoked by uid 99); 15 Jul 2008 00:00:22 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2008 17:00:22 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 14 Jul 2008 23:59:37 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9F9CC234C164 for ; Mon, 14 Jul 2008 16:59:31 -0700 (PDT) Message-ID: <1002182057.1216079971652.JavaMail.jira@brutus> Date: Mon, 14 Jul 2008 16:59:31 -0700 (PDT) From: "Chris Douglas (JIRA)" To: core-dev@hadoop.apache.org Subject: [jira] Updated: (HADOOP-3737) CompressedWritable throws OutOfMemoryError In-Reply-To: <240082439.1215653131570.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HADOOP-3737?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chris Douglas updated HADOOP-3737: ---------------------------------- Resolution: Fixed Status: Resolved (was: Patch Available) I just committed this. Thanks, Grant > CompressedWritable throws OutOfMemoryError > ------------------------------------------ > > Key: HADOOP-3737 > URL: https://issues.apache.org/jira/browse/HADOOP-3737 > Project: Hadoop Core > Issue Type: Bug > Components: io > Affects Versions: 0.17.0 > Reporter: Grant Glouser > Assignee: Grant Glouser > Fix For: 0.18.0 > > Attachments: HADOOP-3737.patch > > > We were seeing OutOfMemoryErrors with stack traces like the following (Hadoop 0.17.0): > {noformat} > java.lang.OutOfMemoryError > at java.util.zip.Deflater.init(Native Method) > at java.util.zip.Deflater.(Deflater.java:123) > at java.util.zip.Deflater.(Deflater.java:132) > at org.apache.hadoop.io.CompressedWritable.write(CompressedWritable.java:71) > at org.apache.hadoop.io.serializer.WritableSerialization$WritableSerializer.serialize(WritableSerialization.java:90) > at org.apache.hadoop.io.serializer.WritableSerialization$WritableSerializer.serialize(WritableSerialization.java:77) > at org.apache.hadoop.io.SequenceFile$Writer.append(SequenceFile.java:1016) > [...] > {noformat} > A Google search found the following long-standing issue in Java in which use of java.util.zip.Deflater causes an OutOfMemoryError: > [http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4797189] > CompressedWritable instantiates a Deflater, but does not call {{deflater.end()}}. It should do that in order to release the Deflater's resources immediately, instead of waiting for the object to be finalized. > We applied this change locally and saw much improvement in the stability of memory usage of our app. > This may also affect the SequenceFile compression types, because org.apache.hadoop.io.compress.zlib.BuiltInZlib{Deflater,Inflater} extend java.util.zip.{Deflater,Inflater}. org.apache.hadoop.io.compress.Compressor defines an end() method, but I do not see that this method is ever called. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.