-
- Downloads
[SPARK-7660] Wrap SnappyOutputStream to work around snappy-java bug
This patch wraps `SnappyOutputStream` to ensure that `close()` is idempotent and to guard against write-after-`close()` bugs. This is a workaround for https://github.com/xerial/snappy-java/issues/107, a bug where a non-idempotent `close()` method can lead to stream corruption. We can remove this workaround if we upgrade to a snappy-java version that contains my fix for this bug, but in the meantime this patch offers a backportable Spark fix. Author: Josh Rosen <joshrosen@databricks.com> Closes #6176 from JoshRosen/SPARK-7660-wrap-snappy and squashes the following commits: 8b77aae [Josh Rosen] Wrap SnappyOutputStream to fix SPARK-7660
Showing
- core/src/main/scala/org/apache/spark/io/CompressionCodec.scala 47 additions, 2 deletions...src/main/scala/org/apache/spark/io/CompressionCodec.scala
- core/src/test/java/org/apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java 0 additions, 8 deletions...apache/spark/shuffle/unsafe/UnsafeShuffleWriterSuite.java
Please register or sign in to comment