-
Notifications
You must be signed in to change notification settings - Fork 28.3k
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-17650] malformed url's throw exceptions before bricking Executors #15224
Conversation
cc @rxin |
Should we check more in addition to just mailformed urls? |
Other places check malformedURIs already (since we always pass around URIs). We can check if the endpoint exists and everything, but that seems a bit heavyweight. |
Maybe we also need the blacklisting in case of failures? Maybe they provide a valid URL that doesn't exist, or is unreachable? |
cc @zsxwing for review ... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Just one nit.
} catch { | ||
case e: MalformedURLException => | ||
val msg = s"URI (${uri.toString}) is not a valid URL." | ||
logError(msg) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: not need to log it since it's already be thrown.
@zsxwing Thanks for the review. Addressed the nit. |
Test build #65846 has finished for PR 15224 at commit
|
Test build #65854 has finished for PR 15224 at commit
|
Thanks. Merging to master and 2.0. |
## What changes were proposed in this pull request? When a malformed URL was sent to Executors through `sc.addJar` and `sc.addFile`, the executors become unusable, because they constantly throw `MalformedURLException`s and can never acknowledge that the file or jar is just bad input. This PR tries to fix that problem by making sure MalformedURLs can never be submitted through `sc.addJar` and `sc.addFile`. Another solution would be to blacklist bad files and jars on Executors. Maybe fail the first time, and then ignore the second time (but print a warning message). ## How was this patch tested? Unit tests in SparkContextSuite Author: Burak Yavuz <brkyvz@gmail.com> Closes #15224 from brkyvz/SPARK-17650. (cherry picked from commit 59d87d2) Signed-off-by: Shixiong Zhu <shixiong@databricks.com>
What changes were proposed in this pull request?
When a malformed URL was sent to Executors through
sc.addJar
andsc.addFile
, the executors become unusable, because they constantly throwMalformedURLException
s and can never acknowledge that the file or jar is just bad input.This PR tries to fix that problem by making sure MalformedURLs can never be submitted through
sc.addJar
andsc.addFile
. Another solution would be to blacklist bad files and jars on Executors. Maybe fail the first time, and then ignore the second time (but print a warning message).How was this patch tested?
Unit tests in SparkContextSuite