You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2015/09/12 10:20:14 UTC

spark git commit: [SPARK-10566] [CORE] SnappyCompressionCodec init exception handling masks important error information

Repository: spark
Updated Branches:
  refs/heads/master c34fc1976 -> 6d8367807


[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 <da...@danielimfeld.com>

Closes #8725 from dimfeld/dimfeld-patch-1.


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/6d836780
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/6d836780
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/6d836780

Branch: refs/heads/master
Commit: 6d8367807cb62c2cb139cee1d039dc8b12c63385
Parents: c34fc19
Author: Daniel Imfeld <da...@danielimfeld.com>
Authored: Sat Sep 12 09:19:59 2015 +0100
Committer: Sean Owen <so...@cloudera.com>
Committed: Sat Sep 12 09:19:59 2015 +0100

----------------------------------------------------------------------
 core/src/main/scala/org/apache/spark/io/CompressionCodec.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/6d836780/core/src/main/scala/org/apache/spark/io/CompressionCodec.scala
----------------------------------------------------------------------
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 607d5a3..9dc3670 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 = {


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org