hvanhovell commented on code in PR #42591:
URL: https://github.com/apache/spark/pull/42591#discussion_r1300637450
##########
connector/connect/client/jvm/src/test/scala/org/apache/spark/sql/test/RemoteSparkSession.scala:
##########
@@ -55,33 +56,34 @@ object SparkConnectServerUtils {
@volatile private var stopped = false
- private var consoleOut: BufferedOutputStream = _
+ private var consoleOut: OutputStream = _
private val serverStopCommand = "q"
- private lazy val sparkConnect: Process = {
+ private lazy val sparkConnect: java.lang.Process = {
debug("Starting the Spark Connect Server...")
val connectJar = findJar(
"connector/connect/server",
"spark-connect-assembly",
"spark-connect").getCanonicalPath
- val builder = Process(
- Seq(
- "bin/spark-submit",
- "--driver-class-path",
- connectJar,
- "--conf",
- s"spark.connect.grpc.binding.port=$port") ++ testConfigs ++
debugConfigs ++ Seq(
- "--class",
- "org.apache.spark.sql.connect.SimpleSparkConnectService",
- connectJar),
- new File(sparkHome))
-
- val io = new ProcessIO(
- in => consoleOut = new BufferedOutputStream(in),
- out => Source.fromInputStream(out).getLines.foreach(debug),
- err => Source.fromInputStream(err).getLines.foreach(debug))
- val process = builder.run(io)
+ val command = Seq.newBuilder[String]
+ command += "bin/spark-submit"
+ command += "--class" +=
"org.apache.spark.sql.connect.SimpleSparkConnectService"
+ command += "--conf" += s"spark.connect.grpc.binding.port=$port"
+ command ++= testConfigs
+ command ++= debugConfigs
+ command += connectJar
+ val builder = new ProcessBuilder(command.result(): _*)
+ builder.directory(new File(sparkHome))
+ val environment = builder.environment()
+ environment.remove("SPARK_DIST_CLASSPATH")
Review Comment:
This is the important bit, here we nuke the `SPARK_DIST_CLASSPATH` env
variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]