Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/2871#discussion_r19455404
--- Diff:
core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala ---
@@ -157,14 +161,12 @@ private[spark] class TorrentBroadcast[T:
ClassTag](obj: T, id: Long)
out.defaultWriteObject()
}
- /** Used by the JVM when deserializing this object. */
- private def readObject(in: ObjectInputStream): Unit =
Utils.tryOrIOException {
- in.defaultReadObject()
+ private def readBroadcastBlock(): T = Utils.tryOrIOException {
--- End diff --
I don't think that `Utils.tryOrIOException` is _strictly_ necessary here,
since this method will no longer be called from `readObject()`, so we won't
have to worry about any exceptions that it throws being swallowed inside of a
Java deserializer. I added the `tryOrIOException` blocks as part of a general
campaign to combat error-reporting issues in our custom Externalizable /
Serializable classes. It's fine to use this here, though, if you want to
restrict the range of possible exceptions that can be thrown when calling
`getValue()`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]