commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krosenv...@apache.org
Subject svn commit: r1654572 - in /commons/proper/compress/trunk: ./ src/main/java/org/apache/commons/compress/archivers/zip/ src/main/java/org/apache/commons/compress/parallel/ src/test/java/org/apache/commons/compress/archivers/zip/
Date Sat, 24 Jan 2015 19:26:21 GMT
Author: krosenvold
Date: Sat Jan 24 19:26:20 2015
New Revision: 1654572

URL: http://svn.apache.org/r1654572
Log:
Moved zip-unspecific scatter/gather code to org.apache.commons.compress.parallel

Added:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java
      - copied, changed from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FileBasedScatterGatherBackingStore.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/InputStreamSupplier.java
      - copied, changed from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/InputStreamSupplier.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStore.java
      - copied, changed from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStore.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStoreSupplier.java
      - copied, changed from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStoreSupplier.java
Removed:
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FileBasedScatterGatherBackingStore.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/InputStreamSupplier.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStore.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStoreSupplier.java
Modified:
    commons/proper/compress/trunk/findbugs-exclude-filter.xml
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
    commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryRequest.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSample.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSampleTest.java
    commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStreamTest.java

Modified: commons/proper/compress/trunk/findbugs-exclude-filter.xml
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/findbugs-exclude-filter.xml?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/findbugs-exclude-filter.xml (original)
+++ commons/proper/compress/trunk/findbugs-exclude-filter.xml Sat Jan 24 19:26:20 2015
@@ -160,7 +160,7 @@
   
   <!-- Reason: failure to delete a file that may not exist. And we really don't care that
much either -->
   <Match>
-    <Class name="org.apache.commons.compress.archivers.zip.FileBasedScatterGatherBackingStore"
/>
+    <Class name="org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore"
/>
     <Method name="close" />
     <Bug pattern="RV_RETURN_VALUE_IGNORED_BAD_PRACTICE" />
   </Match>

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreator.java
Sat Jan 24 19:26:20 2015
@@ -17,6 +17,11 @@
  */
 package org.apache.commons.compress.archivers.zip;
 
+import org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore;
+import org.apache.commons.compress.parallel.InputStreamSupplier;
+import org.apache.commons.compress.parallel.ScatterGatherBackingStore;
+import org.apache.commons.compress.parallel.ScatterGatherBackingStoreSupplier;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.ArrayList;

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStream.java
Sat Jan 24 19:26:20 2015
@@ -18,6 +18,8 @@
 package org.apache.commons.compress.archivers.zip;
 
 
+import org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore;
+import org.apache.commons.compress.parallel.ScatterGatherBackingStore;
 import org.apache.commons.compress.utils.BoundedInputStream;
 
 import java.io.Closeable;

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/StreamCompressor.java
Sat Jan 24 19:26:20 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.compress.archivers.zip;
 
+import org.apache.commons.compress.parallel.ScatterGatherBackingStore;
+
 import java.io.Closeable;
 import java.io.DataOutput;
 import java.io.IOException;

Modified: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryRequest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryRequest.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryRequest.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveEntryRequest.java
Sat Jan 24 19:26:20 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.compress.archivers.zip;
 
+import org.apache.commons.compress.parallel.InputStreamSupplier;
+
 import java.io.InputStream;
 
 /**

Copied: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java
(from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FileBasedScatterGatherBackingStore.java)
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java?p2=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java&p1=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FileBasedScatterGatherBackingStore.java&r1=1654501&r2=1654572&rev=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/FileBasedScatterGatherBackingStore.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/FileBasedScatterGatherBackingStore.java
Sat Jan 24 19:26:20 2015
@@ -15,7 +15,7 @@
  *  limitations under the License.
  *
  */
-package org.apache.commons.compress.archivers.zip;
+package org.apache.commons.compress.parallel;
 
 import java.io.File;
 import java.io.FileNotFoundException;

Copied: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/InputStreamSupplier.java
(from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/InputStreamSupplier.java)
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/InputStreamSupplier.java?p2=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/InputStreamSupplier.java&p1=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/InputStreamSupplier.java&r1=1654501&r2=1654572&rev=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/InputStreamSupplier.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/InputStreamSupplier.java
Sat Jan 24 19:26:20 2015
@@ -17,14 +17,16 @@
  * under the License.
  */
 
-package org.apache.commons.compress.archivers.zip;
+package org.apache.commons.compress.parallel;
 
 import java.io.InputStream;
 
 /**
  * Supplies input streams.
  *
- * Implementations are required to be thread safe.
+ * Implementations are required to support thread-handover. While an instance will
+ * not be accessed concurrently by multiple threads, it will be called by
+ * a different thread than it was created on.
  *
  * @since 1.10
  */

Copied: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStore.java
(from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStore.java)
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStore.java?p2=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStore.java&p1=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStore.java&r1=1654501&r2=1654572&rev=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStore.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStore.java
Sat Jan 24 19:26:20 2015
@@ -15,15 +15,17 @@
  *  limitations under the License.
  *
  */
-package org.apache.commons.compress.archivers.zip;
+package org.apache.commons.compress.parallel;
 
 import java.io.Closeable;
 import java.io.IOException;
 import java.io.InputStream;
 
 /**
- * <p></p>Abstraction over a scatter-output zip archives can be written to
- * with a method to gather all content from an InputStream later on.</p>
+ * <p>Store intermediate payload in a scatter-gather scenario.
+ * Multiple threads write their payload to a backing store, which can
+ * subsequently be reversed to an #InputStream to be used as input in the
+ * gather phase.</p>
  *
  * <p>It is the responsibility of the allocator of an instance of this class
  * to close this. Closing it should clear off any allocated structures

Copied: commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStoreSupplier.java
(from r1654501, commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStoreSupplier.java)
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStoreSupplier.java?p2=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStoreSupplier.java&p1=commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStoreSupplier.java&r1=1654501&r2=1654572&rev=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/zip/ScatterGatherBackingStoreSupplier.java
(original)
+++ commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/parallel/ScatterGatherBackingStoreSupplier.java
Sat Jan 24 19:26:20 2015
@@ -16,7 +16,7 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-package org.apache.commons.compress.archivers.zip;
+package org.apache.commons.compress.parallel;
 
 import java.io.IOException;
 
@@ -27,7 +27,7 @@ import java.io.IOException;
  */
 public interface ScatterGatherBackingStoreSupplier {
     /**
-     * Get a ScatterGatherBackingStore.
+     * Create a ScatterGatherBackingStore.
      *
      * @return a ScatterGatherBackingStore, not null
      */

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ParallelScatterZipCreatorTest.java
Sat Jan 24 19:26:20 2015
@@ -17,6 +17,10 @@
  */
 package org.apache.commons.compress.archivers.zip;
 
+import org.apache.commons.compress.parallel.FileBasedScatterGatherBackingStore;
+import org.apache.commons.compress.parallel.InputStreamSupplier;
+import org.apache.commons.compress.parallel.ScatterGatherBackingStore;
+import org.apache.commons.compress.parallel.ScatterGatherBackingStoreSupplier;
 import org.apache.commons.compress.utils.IOUtils;
 import org.junit.After;
 import org.junit.Test;

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSample.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSample.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSample.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSample.java
Sat Jan 24 19:26:20 2015
@@ -17,6 +17,8 @@
  */
 package org.apache.commons.compress.archivers.zip;
 
+import org.apache.commons.compress.parallel.InputStreamSupplier;
+
 import java.io.File;
 import java.io.IOException;
 import java.util.concurrent.ExecutionException;

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSampleTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSampleTest.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSampleTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterSampleTest.java
Sat Jan 24 19:26:20 2015
@@ -17,6 +17,7 @@
  */
 package org.apache.commons.compress.archivers.zip;
 
+import org.apache.commons.compress.parallel.InputStreamSupplier;
 import org.apache.commons.compress.utils.IOUtils;
 import org.junit.Test;
 

Modified: commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStreamTest.java
URL: http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStreamTest.java?rev=1654572&r1=1654571&r2=1654572&view=diff
==============================================================================
--- commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStreamTest.java
(original)
+++ commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/ScatterZipOutputStreamTest.java
Sat Jan 24 19:26:20 2015
@@ -17,6 +17,7 @@
  */
 package org.apache.commons.compress.archivers.zip;
 
+import org.apache.commons.compress.parallel.InputStreamSupplier;
 import org.apache.commons.compress.utils.IOUtils;
 import org.junit.After;
 import org.junit.Test;



Mime
View raw message