-
Notifications
You must be signed in to change notification settings - Fork 29.3k
[SPARK-28106][SQL] When Spark SQL use "add jar" , before add to SparkContext, check jar path exist first. #24909
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
Closed
Closed
Changes from 26 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
0e22773
[spark-28016] check add jar path exist jar
44b5462
Change jar path check to SessionResourceBuilder
22b56a5
Modify scala stype
63b7c6a
modify commengt to JAVA doc style
cf98646
add check to SparkContext and only check for sql behavior
71af716
fix scala type
e863d20
fix bug of parameter loss
4bb4e89
add origin add jar method
f53fe21
fix scala type error
5f277c2
For local jar file, it will be checked with addJarFile method, then c…
2a159ec
fix path to null problem
95edb94
remove import
dbf97e8
for check scala import style
3093864
review
4732662
add origin comment
8041ff2
add origin comment
b7dabc6
Add unit test
cbe447e
fix line length exceds 100 characters
2a6c570
fix line length
64ddf9d
[SPARK-28106]Always check jar exists
6e31698
remove unused comment
4526b90
remove blank line
ec6111c
.
23825a3
don't return exception
8d0f3f9
fix scala style
da76d97
Change test assert method for better style
8820641
fix little bug
03dcfaf
change unit test title
780a2b5
change method name from addRemoteJarFile to checkRemoteJarFile
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -165,6 +165,17 @@ class SparkContextSuite extends SparkFunSuite with LocalSparkContext with Eventu | |
| } | ||
| } | ||
|
|
||
| test("add hdfs jar files not exists") { | ||
| try { | ||
| val jarPath = "hdfs:///no/path/to/TestUDTF.jar" | ||
| sc = new SparkContext(new SparkConf().setAppName("test").setMaster("local")) | ||
| sc.addJar(jarPath) | ||
| assert(sc.listJars().forall(!_..contains("TestUDTF.jar"))) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you have an extra period here
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. == |
||
| } finally { | ||
| sc.stop() | ||
| } | ||
| } | ||
|
|
||
| test("SPARK-17650: malformed url's throw exceptions before bricking Executors") { | ||
| try { | ||
| sc = new SparkContext(new SparkConf().setAppName("test").setMaster("local")) | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Better to change to
checkRemoteJarFile, here in this method it only checks the jar file.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.
origin addFileJar will also check jar exists. all same to local jar file .
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.
addJarFilealso adds the jar file to fileserver, that's the key purpose there, not just checking.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.
Reasonable, done .