aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Imfeld <daniel@danielimfeld.com>2015-09-12 09:19:59 +0100
committerSean Owen <sowen@cloudera.com>2015-09-12 09:19:59 +0100
commit6d8367807cb62c2cb139cee1d039dc8b12c63385 (patch)
tree42c4b869b5ec7ac025ff051b19ad0c4484f7f0a5
parentc34fc19765bdf55365cdce78d9ba11b220b73bb6 (diff)
downloadspark-6d8367807cb62c2cb139cee1d039dc8b12c63385.tar.gz
spark-6d8367807cb62c2cb139cee1d039dc8b12c63385.tar.bz2
spark-6d8367807cb62c2cb139cee1d039dc8b12c63385.zip
[SPARK-10566] [CORE] SnappyCompressionCodec init exception handling masks important error information
When throwing an IllegalArgumentException in SnappyCompressionCodec.init, chain the existing exception. This allows potentially important debugging info to be passed to the user. Manual testing shows the exception chained properly, and the test suite still looks fine as well. This contribution is my original work and I license the work to the project under the project's open source license. Author: Daniel Imfeld <daniel@danielimfeld.com> Closes #8725 from dimfeld/dimfeld-patch-1.
-rw-r--r--core/src/main/scala/org/apache/spark/io/CompressionCodec.scala2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/src/main/scala/org/apache/spark/io/CompressionCodec.scala b/core/src/main/scala/org/apache/spark/io/CompressionCodec.scala
index 607d5a321e..9dc36704a6 100644
--- a/core/src/main/scala/org/apache/spark/io/CompressionCodec.scala
+++ b/core/src/main/scala/org/apache/spark/io/CompressionCodec.scala
@@ -148,7 +148,7 @@ class SnappyCompressionCodec(conf: SparkConf) extends CompressionCodec {
try {
Snappy.getNativeLibraryVersion
} catch {
- case e: Error => throw new IllegalArgumentException
+ case e: Error => throw new IllegalArgumentException(e)
}
override def compressedOutputStream(s: OutputStream): OutputStream = {