You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by rx...@apache.org on 2014/03/30 07:01:42 UTC

git commit: Don't swallow all kryo errors, only those that indicate we are out of data.

Repository: spark
Updated Branches:
  refs/heads/master fda86d8b4 -> 92b83959c


Don't swallow all kryo errors, only those that indicate we are out of data.

Author: Michael Armbrust <mi...@databricks.com>

Closes #142 from marmbrus/kryoErrors and squashes the following commits:

9c72d1f [Michael Armbrust] Make the test more future proof.
78f5a42 [Michael Armbrust] Don't swallow all kryo errors, only those that indicate we are out of data.


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

Branch: refs/heads/master
Commit: 92b83959cacbc902ff0b50110261f097bf2df247
Parents: fda86d8
Author: Michael Armbrust <mi...@databricks.com>
Authored: Sat Mar 29 22:01:29 2014 -0700
Committer: Reynold Xin <rx...@apache.org>
Committed: Sat Mar 29 22:01:29 2014 -0700

----------------------------------------------------------------------
 .../main/scala/org/apache/spark/serializer/KryoSerializer.scala   | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/spark/blob/92b83959/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
----------------------------------------------------------------------
diff --git a/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala b/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
index 6b6d814..926e715 100644
--- a/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
+++ b/core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala
@@ -107,7 +107,8 @@ class KryoDeserializationStream(kryo: Kryo, inStream: InputStream) extends Deser
       kryo.readClassAndObject(input).asInstanceOf[T]
     } catch {
       // DeserializationStream uses the EOF exception to indicate stopping condition.
-      case _: KryoException => throw new EOFException
+      case e: KryoException if e.getMessage.toLowerCase.contains("buffer underflow") =>
+        throw new EOFException
     }
   }