Return-Path: Delivered-To: apmail-lucene-hadoop-dev-archive@locus.apache.org Received: (qmail 84494 invoked from network); 7 Nov 2006 22:57:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 7 Nov 2006 22:57:21 -0000 Received: (qmail 29974 invoked by uid 500); 7 Nov 2006 22:57:27 -0000 Delivered-To: apmail-lucene-hadoop-dev-archive@lucene.apache.org Received: (qmail 29933 invoked by uid 500); 7 Nov 2006 22:57:27 -0000 Mailing-List: contact hadoop-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hadoop-dev@lucene.apache.org Delivered-To: mailing list hadoop-dev@lucene.apache.org Received: (qmail 29699 invoked by uid 99); 7 Nov 2006 22:57:27 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 14:57:26 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 14:57:14 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id A06867142F7 for ; Tue, 7 Nov 2006 14:56:54 -0800 (PST) Message-ID: <3923148.1162940214654.JavaMail.jira@brutus> Date: Tue, 7 Nov 2006 14:56:54 -0800 (PST) From: "Owen O'Malley (JIRA)" To: hadoop-dev@lucene.apache.org Subject: [jira] Commented: (HADOOP-538) Implement a nio's 'direct buffer' based wrapper over zlib to improve performance of java.util.zip.{De|In}flater as a 'custom codec' In-Reply-To: <12431612.1158299902379.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 [ http://issues.apache.org/jira/browse/HADOOP-538?page=comments#action_12447951 ] Owen O'Malley commented on HADOOP-538: -------------------------------------- The ZlibCompressor has dead nativeZlibLoaded code. The ZlibFactory getGzip{Decom,Com}pressor methods should never return null, because their contract should be that they always return a valid implementation regardless of whether the native library was loaded. I see that the problem is that you want to use the native Gzip stream stuff, which doesn't provide a {com,decom}pressor. I guess I'd vote for just using: public CompressionInputStream createInputStream(InputStream in) throws IOException { if (ZlibFactory.isNativeZlibLoaded()) { return new DecompressorStream(...); } else { return new GzipInputStream(in); } } and removing the extra ZlibFactory.getGzip* methods. > Implement a nio's 'direct buffer' based wrapper over zlib to improve performance of java.util.zip.{De|In}flater as a 'custom codec' > ----------------------------------------------------------------------------------------------------------------------------------- > > Key: HADOOP-538 > URL: http://issues.apache.org/jira/browse/HADOOP-538 > Project: Hadoop > Issue Type: Improvement > Affects Versions: 0.6.1 > Reporter: Arun C Murthy > Assigned To: Arun C Murthy > Fix For: 0.9.0 > > Attachments: HADOOP-538.patch, HADOOP-538_20061005.tgz, HADOOP-538_20061011.tgz, HADOOP-538_20061026.tgz, HADOOP-538_20061030.tgz, HADOOP-538_20061107.tgz, HADOOP-538_benchmarks.tgz > > > There has been more than one instance where java.util.zip's {De|In}flater classes perform unreliably, a simple wrapper over zlib-1.2.3 (latest stable) using java.nio.ByteBuffer (i.e. direct buffers) should go a long way in alleviating these woes. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira