-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-33084][CORE][SQL] Add jar support ivy path #29966
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
Changes from 1 commit
afaf7bd
51daf9a
3579de0
d6e8caf
169e1f8
0e589ec
b3e3211
9161340
0e3c1ec
300ca56
63e877b
733e62c
b60ba1e
883b9d3
208afc2
ba9ea29
10b3737
7f878c2
d2c1950
2200076
5a9cc30
875d8a7
e921245
614a865
8c5cb7c
f460974
1f7dc01
050c410
ff611a6
03aca3b
653b919
6e48275
bdc5035
9c22882
9c88f8d
8220e5a
49ac62c
b69a62e
273a5ac
ebe1c9c
6034fb2
e22e398
afea73f
13000f2
bce3d40
d53f302
57c351d
8c53b83
4048c5b
aa53482
2ffb431
8c18cdf
6bd41cd
fbc236c
90491d5
75ff3ce
4c44dae
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
- Loading branch information
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1923,7 +1923,7 @@ class SparkContext(config: SparkConf) extends Logging { | |
| case "ivy" => | ||
| // Since `new Path(path).toUri` will lose query information, | ||
| // so here we use `URI.create(path)` | ||
| Utils.resolveMavenDependencies(URI.create(path)) | ||
| DependencyUtils.resolveMavenDependencies(URI.create(path)) | ||
|
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. What if two added jars have the same dependency with different versions? e.g.,
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. Done |
||
| case _ => checkRemoteJarFile(path) | ||
| } | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -15,7 +15,7 @@ | |
| * limitations under the License. | ||
| */ | ||
|
|
||
| package org.apache.spark.deploy | ||
| package org.apache.spark.util | ||
|
|
||
| import java.io.File | ||
| import java.net.URI | ||
|
|
@@ -25,10 +25,10 @@ import org.apache.hadoop.conf.Configuration | |
| import org.apache.hadoop.fs.{FileSystem, Path} | ||
|
|
||
| import org.apache.spark.{SecurityManager, SparkConf, SparkException} | ||
| import org.apache.spark.deploy.SparkSubmitUtils | ||
| import org.apache.spark.internal.Logging | ||
| import org.apache.spark.util.{MutableURLClassLoader, Utils} | ||
|
|
||
| private[deploy] object DependencyUtils extends Logging { | ||
| private[spark] object DependencyUtils extends Logging { | ||
|
|
||
| def getIvyProperties(): Seq[String] = { | ||
|
||
| Seq( | ||
|
|
@@ -46,7 +46,8 @@ private[deploy] object DependencyUtils extends Logging { | |
| Array.empty[String] | ||
| } else { | ||
| val mapTokens = queryString.split("&") | ||
| assert(mapTokens.forall(_.split("=").length == 2), "Invalid query string: " + queryString) | ||
| assert(mapTokens.forall(_.split("=").length == 2) | ||
AngersZhuuuu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| , "Invalid URI query string: [ " + queryString + " ]") | ||
| mapTokens.map(_.split("=")).map(kv => (kv(0), kv(1))).filter(_._1 == queryTag).map(_._2) | ||
| } | ||
| } | ||
|
|
@@ -65,7 +66,8 @@ private[deploy] object DependencyUtils extends Logging { | |
| .flatMap { excludeString => | ||
| val excludes: Array[String] = excludeString.split(",") | ||
| assert(excludes.forall(_.split(":").length == 2), | ||
AngersZhuuuu marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| "Invalid exclude string: expected 'org:module,org:module,..', found " + excludeString) | ||
| "Invalid exclude string: expected 'org:module,org:module,..'," + | ||
| " found [ " + excludeString + " ]") | ||
| excludes | ||
| }.mkString(":") | ||
| } | ||
|
|
@@ -106,7 +108,7 @@ private[deploy] object DependencyUtils extends Logging { | |
| uri.getAuthority, | ||
| repositories, | ||
| ivyRepoPath, | ||
| Some(ivySettingsPath) | ||
| Option(ivySettingsPath) | ||
| ) | ||
| } | ||
|
|
||
|
|
||
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.
@AngersZhuuuu, out of curiosity, is the Ivy URI the standard form documented somewhere? or something specific to Spark that you came up with?
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.
From hive https://issues.apache.org/jira/browse/HIVE-9664, since it download jar use
ivythen use schema asivy? I think this useful for a lot of companies that have standard package management, so I implemented it in Spark