Return-Path: X-Original-To: apmail-commons-dev-archive@www.apache.org Delivered-To: apmail-commons-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 70A8E103F1 for ; Fri, 23 Jan 2015 18:34:41 +0000 (UTC) Received: (qmail 34638 invoked by uid 500); 23 Jan 2015 18:34:41 -0000 Delivered-To: apmail-commons-dev-archive@commons.apache.org Received: (qmail 34478 invoked by uid 500); 23 Jan 2015 18:34:41 -0000 Mailing-List: contact dev-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Commons Developers List" Delivered-To: mailing list dev@commons.apache.org Received: (qmail 34466 invoked by uid 99); 23 Jan 2015 18:34:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2015 18:34:40 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [209.85.213.169] (HELO mail-ig0-f169.google.com) (209.85.213.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 23 Jan 2015 18:34:35 +0000 Received: by mail-ig0-f169.google.com with SMTP id hl2so3521471igb.0 for ; Fri, 23 Jan 2015 10:33:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:content-type; bh=fin8TfEwdOpO0X53bZ/JHxLKobztDUoM8KZpMoNhcCI=; b=auK13uU/DXWRpBiEHD1KPixgEreP+ZKo3HmW5S9vPwv4d8wtDxY8PSLX3Zbb6yT5WH QqPqoI9vz1xVQFnVw/xmaZO5GB+aCxFdKxdp7Vop7d0uaJU7WcfXFeW5aRYbkpYpo95u n3nLm86TRfeiA3XbZKPBGuRxHgsGqh9gmBMvPtPPGr5iQfyziJwYOIxppQD8agDy2tMH h9BMJBMlQkjHrDhaFj7bVBBOrAG2DrG3ARQoiaRK3EuthkJtoFYuJZyBXQwcEqisMNNp ZfRk7fgjyW8BTivQgIesTYmSRxi19lWhMnoqcSSSSbs9JfwKRj1P8+47BN3tKMZ288KX 6BYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=fin8TfEwdOpO0X53bZ/JHxLKobztDUoM8KZpMoNhcCI=; b=QvoZtKMs9HZb94TASXNSNbsUWSxFZtBvPTHtTe+SdSsweO2IcdurIB1EgEB1YX2KDD hplVpgkFc3X3XTuJo0jaXtK9xwhZsTd+bJGqiDI7g/RcKRslOibzNu1N1hpecRcgMxyG 9EjvJO78ZEoDft9IenZyMWpRjjpiTbs9Bclc1f7vOqjU1REv/1lCqR8jzRKps6t7ud1S eHTuTTsDy7Dd7KrEfATUO6t2PW2U4VX1uOote3tNU9l3hihYDv/RaDZmElIsiCevpduW VuEv1/b7R+fjj7qjlyiSWnRlkRbeeGmbuy2Aucho/ZpWEvBW60+B+dKc0H6WziILZHvl lOoQ== X-Gm-Message-State: ALoCoQkXWOdah/HDMo+hYjRewG812wQbABoxe1iBBCRDGPLk7IiiLjnSrf73b98yA0rOb22oxdaT MIME-Version: 1.0 X-Received: by 10.107.3.170 with SMTP id e42mr5437353ioi.65.1422037988801; Fri, 23 Jan 2015 10:33:08 -0800 (PST) Sender: kristian.rosenvold@zenior.no Received: by 10.50.128.107 with HTTP; Fri, 23 Jan 2015 10:33:08 -0800 (PST) In-Reply-To: <54C22802.7000101@apache.org> References: <87vbjy93rj.fsf@v35516.1blu.de> <54C22802.7000101@apache.org> Date: Fri, 23 Jan 2015 19:33:08 +0100 X-Google-Sender-Auth: kYtO0VoaDlx98c_4JmJGSGXQd0E Message-ID: Subject: Re: [compress] Preparations for 1.10 From: Kristian Rosenvold To: Commons Developers List Content-Type: text/plain; charset=UTF-8 X-Virus-Checked: Checked by ClamAV on apache.org 2015-01-23 11:52 GMT+01:00 Emmanuel Bourg : > - PasswordRequiredException: the exception is in the sevenz package, do > we want to move it elsewhere so it can be used later for other formats > like zip (if that makes sense). Makes sense, where should we put that ? > - there are some missing @since tags on the new classes > (ScatterGatherBackingStoreSupplier, ParallelScatterZipCreator, > InputStreamSupplier, ZipArchiveEntryRequest, ZipArchiveEntryPredicate) Fixed r1654291 > - InputStreamSupplier could have been replaced with > Supplier if we were using Java 8. But with the current JDK > I wonder if we could use Callable instead to spare an > interface. Discussed in separate mail; leaving as-is for now. > - If we had a kind of DeferredInputStream (not yet in commons-io sadly) > the API could be slightly simpler. ZipArchiveEntryRequest and > InputStreamSupplier could go away. DeferredInputStream would open an > underlying stream only when a read() method is called. I think the overall memory model constraints in a parallel context favour the "Supplier" approach, since you avoid the entire need for a thread-safe DeferredInputStream. > - ParallelScatterZipCreator has two public methods with a > Callable in the signature, but it's not clear what this Object > actually is. Fixed in r1654291 > > - Is ParallelScatterZipCreator.getStatisticsMessage() intended to remain > in the final API or was it just there for benchmarking the > implementation during the development? If it is meant to stay maybe a > proper ScatterStatistics class would be cleaner. Introduced class in r1654291 > > - ParallelScatterZipCreator.createCallable: the message of the > IllegalArgumentException could mention the name of the entry involved. Also fixed. > - The javadoc of the default ParallelScatterZipCreator constructor could > explain how the thread pool is sized by default. Also fixed. > - Could ScatterGatherBackingStoreSupplier be avoided? The public > ParallelScatterZipCreator constructor that uses it could accept a > ScatterGatherBackingStore instead, we would just have to ensure that the > backing store doesn't open resources until it's used. Concurrent running creates multiple instances, so that won't work. > - ScatterGatherBackingStore, FileBasedScatterGatherBackingStore and > ScatterGatherBackingStoreSupplier are in the zip package but have > nothing specific to the zip format. Should we move them elsewhere so > they can be used later to implement parallel compression for other formats? Good idea; something like org.apache.commons.compress.archivers.concurrent or org.apache.commons.compress.concurrent ? > - I think an example demonstrating the parallel zip creation would be a > nice addition to the site. I'll add some code later tonight. Thanks a lot for some great comments ! Kristian --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org For additional commands, e-mail: dev-help@commons.apache.org