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-33425] Fix https credentials when doing spark-submit #30337
Conversation
Can one of the admins verify this patch? |
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.
Thank you for your contribution, @pprzetacznik . Please run dev/lint-scala
and fix the Scala style issue.
Thank you @dongjoon-hyun for feedback. Could you check now if that looks better? |
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.
Please fix all 14 UT failures.
One more tip, @pprzetacznik . In general, people don't review PRs with |
@@ -743,7 +743,15 @@ private[spark] object Utils extends Logging { | |||
val is = Channels.newInputStream(source) | |||
downloadFile(url, is, targetFile, fileOverwrite) | |||
case "http" | "https" | "ftp" => | |||
val uc = new URL(url).openConnection() | |||
val url_object = new URL(url) | |||
val uc = url_object.openConnection().asInstanceOf[HttpURLConnection] |
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.
Will this work in the case of an FTP URI?
Maybe needs some pattern matching to only set this if this is an HttpURLConnection and user info is not null.
val uc = new URL(url).openConnection() | ||
val url_object = new URL(url) | ||
val uc = url_object.openConnection().asInstanceOf[HttpURLConnection] | ||
uc.setDoInput(true) |
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.
Is this actually needed?
We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
When using:
I receive an error described in https://issues.apache.org/jira/browse/SPARK-33425
What changes were proposed in this pull request?
Passing credentials to the request properties so there's no need for a server to challenge the URLConnection for credentials.
Why are the changes needed?
Documentations says:
Does this PR introduce any user-facing change?
No
How was this patch tested?
Not tested yet. Looking for feedback.