Skip to content

Conversation

@JoshRosen
Copy link
Contributor

If RDD.getPreferredLocations() throws an exception it may crash the DAGScheduler and SparkContext. This patch addresses this by adding a try-catch block.

@JoshRosen
Copy link
Contributor Author

AFAIK RDD.getPartitions() can also throw exceptions, but I wasn't able to trigger a case where a buggy implementation of that method could crash the scheduler.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

once #7014 gets merged we can actually check the causing exception (just a random comment since I just looked at that PR, this is fine as is for now)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm going to merge this PR now since we're going to need this string comparison in order for the regression test to run in backport branches.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh yeah, that is fine with me -- sorry I didn't mean to imply this should wait on the other PR. I was really just making a random observation, sorry if I confused things.

@squito
Copy link
Contributor

squito commented Jun 25, 2015

lgtm

@SparkQA
Copy link

SparkQA commented Jun 25, 2015

Test build #35800 has finished for PR 7023 at commit 770b169.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@JoshRosen
Copy link
Contributor Author

Alright, merging this to master + backport branches.

@asfgit asfgit closed this in 0b5abbf Jun 27, 2015
asfgit pushed a commit that referenced this pull request Jun 27, 2015
…rashing DAGScheduler

If `RDD.getPreferredLocations()` throws an exception it may crash the DAGScheduler and SparkContext. This patch addresses this by adding a try-catch block.

Author: Josh Rosen <[email protected]>

Closes #7023 from JoshRosen/SPARK-8606 and squashes the following commits:

770b169 [Josh Rosen] Fix getPreferredLocations() DAGScheduler crash with try block.
44a9b55 [Josh Rosen] Add test of a buggy getPartitions() method
19aa9f7 [Josh Rosen] Add (failing) regression test for getPreferredLocations() DAGScheduler crash

(cherry picked from commit 0b5abbf)
Signed-off-by: Josh Rosen <[email protected]>
asfgit pushed a commit that referenced this pull request Jun 27, 2015
…rashing DAGScheduler

If `RDD.getPreferredLocations()` throws an exception it may crash the DAGScheduler and SparkContext. This patch addresses this by adding a try-catch block.

Author: Josh Rosen <[email protected]>

Closes #7023 from JoshRosen/SPARK-8606 and squashes the following commits:

770b169 [Josh Rosen] Fix getPreferredLocations() DAGScheduler crash with try block.
44a9b55 [Josh Rosen] Add test of a buggy getPartitions() method
19aa9f7 [Josh Rosen] Add (failing) regression test for getPreferredLocations() DAGScheduler crash

(cherry picked from commit 0b5abbf)
Signed-off-by: Josh Rosen <[email protected]>
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.

3 participants