Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-4080] Only throw IOException from [write|read][Object|External] #2932

Closed
wants to merge 1 commit into from

Conversation

JoshRosen
Copy link
Contributor

If classes implementing Serializable or Externalizable interfaces throw
exceptions other than IOException or ClassNotFoundException from their
(de)serialization methods, then this results in an unhelpful
"IOException: unexpected exception type" rather than the actual exception that
produced the (de)serialization error.

This patch fixes this by adding a utility method that re-wraps any uncaught
exceptions in IOException (unless they are already instances of IOException).

If classes implementing Serializable or Externalizable interfaces throw
exceptions other than IOException or ClassNotFoundException from their
(de)serialization methods, then this results in an unhelpful
"IOException: unexpected exception type" rather than the actual exception that
produced the (de)serialization error.

This patch fixes this by adding a utility method that re-wraps any uncaught
exceptions in IOException (unless they are already instances of IOException).
@JoshRosen
Copy link
Contributor Author

/cc @davies

@SparkQA
Copy link

SparkQA commented Oct 24, 2014

Test build #22153 has started for PR 2932 at commit cd3a9be.

  • This patch merges cleanly.

@davies
Copy link
Contributor

davies commented Oct 24, 2014

Cool, LGTM!

@JoshRosen
Copy link
Contributor Author

This PR passed the Spark core tests, but is going to timeout due to issues in the SQL tests (the #2934 hotfix should have fixed these timeout issues). I'm going to merge this now, since I want this functionality in order to test the Snappy PR. I'll also backport this to branch-1.1, since it should be a helpful debugging aid there, too.

@SparkQA
Copy link

SparkQA commented Oct 24, 2014

Test build #22153 timed out for PR 2932 at commit cd3a9be after a configured wait of 120m.

@AmplabJenkins
Copy link

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/22153/
Test FAILed.

@asfgit asfgit closed this in 6c98c29 Oct 24, 2014
@JoshRosen JoshRosen deleted the SPARK-4080 branch October 24, 2014 22:23
asfgit pushed a commit that referenced this pull request Oct 24, 2014
If classes implementing Serializable or Externalizable interfaces throw
exceptions other than IOException or ClassNotFoundException from their
(de)serialization methods, then this results in an unhelpful
"IOException: unexpected exception type" rather than the actual exception that
produced the (de)serialization error.

This patch fixes this by adding a utility method that re-wraps any uncaught
exceptions in IOException (unless they are already instances of IOException).

Author: Josh Rosen <[email protected]>

Closes #2932 from JoshRosen/SPARK-4080 and squashes the following commits:

cd3a9be [Josh Rosen] [SPARK-4080] Only throw IOException from [write|read][Object|External].

(cherry picked from commit 6c98c29)
Signed-off-by: Josh Rosen <[email protected]>

Conflicts:
	core/src/main/scala/org/apache/spark/broadcast/TorrentBroadcast.scala
	core/src/main/scala/org/apache/spark/scheduler/MapStatus.scala
	streaming/src/main/scala/org/apache/spark/streaming/api/python/PythonDStream.scala
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.

4 participants