juliuszsompolski commented on code in PR #41964:
URL: https://github.com/apache/spark/pull/41964#discussion_r1264232249
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectService.scala:
##########
@@ -259,13 +281,15 @@ object SparkConnectService {
if (debugMode) {
sb.addService(ProtoReflectionService.newInstance())
}
+
server = sb.build
server.start()
+
createListenerAndUI(sparkContextOpt.getOrElse(SparkSession.active.sparkContext))
}
// Starts the service
- def start(): Unit = {
- startGRPCService()
+ def start(sparkContextOpt: Option[SparkContext] = None): Unit = {
Review Comment:
make it `sparkContext: SparkContext` , not an option, and in
SparkConnectServer pass it explcitly from the session there. better that than
having to `.getOrElse(SparkSession.active.sparkContext)` without controlling if
there's an active session here
--
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]