Skip to content

Commit 4c44dae

Browse files
committed
follow comment remove default value
1 parent 75ff3ce commit 4c44dae

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

core/src/main/scala/org/apache/spark/deploy/SparkSubmit.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1368,7 +1368,7 @@ private[spark] object SparkSubmitUtils {
13681368
def resolveMavenCoordinates(
13691369
coordinates: String,
13701370
ivySettings: IvySettings,
1371-
transitive: Boolean = true,
1371+
transitive: Boolean,
13721372
exclusions: Seq[String] = Nil,
13731373
isTest: Boolean = false): String = {
13741374
if (coordinates == null || coordinates.trim.isEmpty) {

core/src/test/scala/org/apache/spark/deploy/SparkSubmitUtilsSuite.scala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
135135
val jarPath = SparkSubmitUtils.resolveMavenCoordinates(
136136
main.toString,
137137
SparkSubmitUtils.buildIvySettings(Option(repo), Some(tempIvyPath)),
138+
transitive = true,
138139
isTest = true)
139140
assert(jarPath.indexOf(tempIvyPath) >= 0, "should use non-default ivy path")
140141
}
@@ -148,6 +149,7 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
148149
val jarPath = SparkSubmitUtils.resolveMavenCoordinates(
149150
main.toString,
150151
SparkSubmitUtils.buildIvySettings(None, Some(tempIvyPath)),
152+
transitive = true,
151153
isTest = true)
152154
assert(jarPath.indexOf("mylib") >= 0, "should find artifact")
153155
assert(jarPath.indexOf("mydep") >= 0, "should find dependency")
@@ -159,6 +161,7 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
159161
val jarPath = SparkSubmitUtils.resolveMavenCoordinates(
160162
main.toString,
161163
SparkSubmitUtils.buildIvySettings(None, Some(tempIvyPath)),
164+
transitive = true,
162165
isTest = true)
163166
assert(jarPath.indexOf("mylib") >= 0, "should find artifact")
164167
assert(jarPath.indexOf("mydep") >= 0, "should find dependency")
@@ -171,6 +174,7 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
171174
val jarPath = SparkSubmitUtils.resolveMavenCoordinates(
172175
main.toString,
173176
SparkSubmitUtils.buildIvySettings(None, Some(tempIvyPath)),
177+
transitive = true,
174178
isTest = true)
175179
assert(jarPath.indexOf("mylib") >= 0, "should find artifact")
176180
assert(jarPath.indexOf(tempIvyPath) >= 0, "should be in new ivy path")
@@ -183,6 +187,7 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
183187
SparkSubmitUtils.resolveMavenCoordinates(
184188
"a:b:c",
185189
SparkSubmitUtils.buildIvySettings(None, Some(tempIvyPath)),
190+
transitive = true,
186191
isTest = true)
187192
}
188193
}
@@ -195,13 +200,15 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
195200
val path = SparkSubmitUtils.resolveMavenCoordinates(
196201
coordinates,
197202
SparkSubmitUtils.buildIvySettings(None, Some(tempIvyPath)),
203+
transitive = true,
198204
isTest = true)
199205
assert(path === "", "should return empty path")
200206
val main = MavenCoordinate("org.apache.spark", "spark-streaming-kafka-assembly_2.12", "1.2.0")
201207
IvyTestUtils.withRepository(main, None, None) { repo =>
202208
val files = SparkSubmitUtils.resolveMavenCoordinates(
203209
coordinates + "," + main.toString,
204210
SparkSubmitUtils.buildIvySettings(Some(repo), Some(tempIvyPath)),
211+
transitive = true,
205212
isTest = true)
206213
assert(files.indexOf(main.artifactId) >= 0, "Did not return artifact")
207214
}
@@ -215,6 +222,7 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
215222
main.toString,
216223
SparkSubmitUtils.buildIvySettings(Some(repo), Some(tempIvyPath)),
217224
exclusions = Seq("my.great.dep:mydep"),
225+
transitive = true,
218226
isTest = true)
219227
assert(files.indexOf(main.artifactId) >= 0, "Did not return artifact")
220228
assert(files.indexOf("my.great.dep") < 0, "Returned excluded artifact")
@@ -250,7 +258,8 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
250258
testUtilSettings.setDefaultIvyUserDir(new File(tempIvyPath))
251259
IvyTestUtils.withRepository(main, Some(dep), Some(dummyIvyLocal), useIvyLayout = true,
252260
ivySettings = testUtilSettings) { repo =>
253-
val jarPath = SparkSubmitUtils.resolveMavenCoordinates(main.toString, settings, isTest = true)
261+
val jarPath = SparkSubmitUtils.resolveMavenCoordinates(main.toString, settings,
262+
transitive = true, isTest = true)
254263
assert(jarPath.indexOf("mylib") >= 0, "should find artifact")
255264
assert(jarPath.indexOf(tempIvyPath) >= 0, "should be in new ivy path")
256265
assert(jarPath.indexOf("mydep") >= 0, "should find dependency")
@@ -265,6 +274,7 @@ class SparkSubmitUtilsSuite extends SparkFunSuite with BeforeAndAfterAll {
265274
val jarPath = SparkSubmitUtils.resolveMavenCoordinates(
266275
main.toString,
267276
ivySettings,
277+
transitive = true,
268278
isTest = true)
269279
val r = """.*org.apache.spark-spark-submit-parent-.*""".r
270280
assert(!ivySettings.getDefaultCache.listFiles.map(_.getName)

sql/hive/src/main/scala/org/apache/spark/sql/hive/client/IsolatedClientLoader.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ private[hive] object IsolatedClientLoader extends Logging {
124124
SparkSubmitUtils.buildIvySettings(
125125
Some(remoteRepos),
126126
ivyPath),
127+
transitive = true,
127128
exclusions = version.exclusions)
128129
}
129130
val allFiles = classpath.split(",").map(new File(_)).toSet

0 commit comments

Comments
 (0)