Skip to content

Commit e3ca1b7

Browse files
committed
Rerouted ivy output to system.err
1 parent 941c65e commit e3ca1b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,9 @@ private[spark] object SparkSubmitUtils {
796796
if (coordinates == null || coordinates.trim.isEmpty) {
797797
""
798798
} else {
799+
val sysOut = System.out
800+
// To prevent ivy from logging to system out
801+
System.setOut(printStream)
799802
val artifacts = extractMavenCoordinates(coordinates)
800803
// Default configuration name for ivy
801804
val ivyConfName = "default"
@@ -854,6 +857,7 @@ private[spark] object SparkSubmitUtils {
854857
packagesDirectory.getAbsolutePath + File.separator + "[artifact](-[classifier]).[ext]",
855858
retrieveOptions.setConfs(Array(ivyConfName)))
856859

860+
System.setOut(sysOut)
857861
resolveDependencyPaths(rr.getArtifacts.toArray, packagesDirectory)
858862
}
859863
}

0 commit comments

Comments
 (0)