Skip to content

Conversation

@squito
Copy link
Contributor

@squito squito commented Jan 22, 2013

Maybe I'm doing something wrong, but w/out this change I get exceptions if I try to deserialize custom classes that I haven't registered. Eg., if I try to shuffle a custom case class:

case class MyCaseClass(val v: Int, val x: String)

I would get an exception:

13/01/21 16:06:54 INFO cluster.TaskSetManager: Loss was due to com.esotericsoftware.kryo.SerializationException: Unable to deserialize object of type: scala.Tuple2
at com.esotericsoftware.kryo.Kryo.readClassAndObject(Kryo.java:571)
at com.esotericsoftware.kryo.ObjectBuffer.readClassAndObject(ObjectBuffer.java:92)
at spark.KryoDeserializationStream.readObject(KryoSerializer.scala:95)
at spark.serializer.DeserializationStream$$anon$1.getNext(Serializer.scala:82)
at spark.serializer.DeserializationStream$$anon$1.hasNext(Serializer.scala:92)
at scala.collection.Iterator$class.foreach(Iterator.scala:660)
at spark.serializer.DeserializationStream$$anon$1.foreach(Serializer.scala:75)
at spark.BlockStoreShuffleFetcher$$anonfun$fetch$6.apply(BlockStoreShuffleFetcher.scala:38)
at spark.BlockStoreShuffleFetcher$$anonfun$fetch$6.apply(BlockStoreShuffleFetcher.scala:34)
at scala.collection.Iterator$class.foreach(Iterator.scala:660)
at scala.collection.Iterator$$anon$22.foreach(Iterator.scala:382)
at spark.BlockStoreShuffleFetcher.fetch(BlockStoreShuffleFetcher.scala:34)
...

this change makes those errors go away

@mateiz
Copy link
Member

mateiz commented Jan 22, 2013

Weird, I could've sworn we fixed this, but maybe not. Is this in distributed mode or local? And how are your classes being sent to the workers, is it with the jars argument of SparkContext?

@squito
Copy link
Contributor Author

squito commented Jan 22, 2013

yeah I was surprised too, I thought it had been fixed somewhere. I'm testing w/ the distributed mode (standalone cluster), with the code sent via the jars argument to SparkContext.

@mateiz
Copy link
Member

mateiz commented Jan 23, 2013

Yeah it's true, it looks like the classloader doesn't get passed to deserializeStream by default. Thanks for the fix.

mateiz added a commit that referenced this pull request Jan 23, 2013
be sure to set class loader of kryo instances
@mateiz mateiz merged commit c2490a2 into mesos:branch-0.6 Jan 23, 2013
@squito
Copy link
Contributor Author

squito commented Jan 23, 2013

great, should I open a separate request to get it in master, or can you just cherry-pick it?

@mateiz
Copy link
Member

mateiz commented Jan 23, 2013

I'll git cherry-pick it, thanks for the reminder.

harveyfeng pushed a commit to harveyfeng/spark-mesos that referenced this pull request Jan 14, 2014
Revert PR 381

This PR missed a bunch of test cases that require "spark.cleaner.ttl". I think it is what is causing test failures on Jenkins right now (though it's a bit hard to tell because the DNS for cs.berkeley.edu is down).

I'm submitting this to see if it fixes jeknins. I did try just patching various tests but it was taking a really long time because there are a bunch of them, so for now I'm just seeing if a revert works.
harveyfeng pushed a commit to harveyfeng/spark-mesos that referenced this pull request Jan 14, 2014
Better error handling in Spark Streaming and more API cleanup

Earlier errors in jobs generated by Spark Streaming (or in the generation of jobs) could not be caught from the main driver thread (i.e. the thread that called StreamingContext.start()) as it would be thrown in different threads. With this change, after `ssc.start`, one can call `ssc.awaitTermination()` which will be block until the ssc is closed, or there is an exception. This makes it easier to debug.

This change also adds ssc.stop(<stop-spark-context>) where you can stop StreamingContext without stopping the SparkContext.

Also fixes the bug that came up with PRs mesos#393 and mesos#381. MetadataCleaner default value has been changed from 3500 to -1 for normal SparkContext and 3600 when creating a StreamingContext. Also, updated StreamingListenerBus with changes similar to SparkListenerBus in mesos#392.

And changed a lot of protected[streaming] to private[streaming].
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants