diff options
author | Michael Armbrust <michael@databricks.com> | 2014-03-29 22:01:29 -0700 |
---|---|---|
committer | Reynold Xin <rxin@apache.org> | 2014-03-29 22:01:29 -0700 |
commit | 92b83959cacbc902ff0b50110261f097bf2df247 (patch) | |
tree | 6777653c5d69735b9c114dac97c09cb4fe2f9392 | |
parent | fda86d8b46a1cc484d11ac5446d8cc2a86429b9b (diff) | |
download | spark-92b83959cacbc902ff0b50110261f097bf2df247.tar.gz spark-92b83959cacbc902ff0b50110261f097bf2df247.tar.bz2 spark-92b83959cacbc902ff0b50110261f097bf2df247.zip |
Don't swallow all kryo errors, only those that indicate we are out of data.
Author: Michael Armbrust <michael@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.
-rw-r--r-- | core/src/main/scala/org/apache/spark/serializer/KryoSerializer.scala | 3 |
1 files changed, 2 insertions, 1 deletions
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 6b6d814c1f..926e71573b 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 } } |