zhenlineo commented on code in PR #41005:
URL: https://github.com/apache/spark/pull/41005#discussion_r1183004284
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/service/SparkConnectStreamHandler.scala:
##########
@@ -47,34 +48,49 @@ class SparkConnectStreamHandler(responseObserver:
StreamObserver[ExecutePlanResp
extends Logging {
def handle(v: ExecutePlanRequest): Unit =
SparkConnectArtifactManager.withArtifactClassLoader {
- val session =
- SparkConnectService
- .getOrCreateIsolatedSession(v.getUserContext.getUserId, v.getSessionId)
- .session
+ val sessionHolder = SparkConnectService
+ .getOrCreateIsolatedSession(v.getUserContext.getUserId, v.getSessionId)
+ val session = sessionHolder.session
+
session.withActive {
+ val debugString = try {
+ Utils.redact(
+ session.sessionState.conf.stringRedactionPattern,
+ ProtoUtils.abbreviate(v).toString)
+ } catch {
+ case NonFatal(e) =>
+ logWarning("Fail to extract debug information", e)
+ "UNKNOWN"
+ }
+
+ val executeHolder = sessionHolder.createExecutePlanHolder(v)
+ session.sparkContext.setJobGroup(
+ executeHolder.jobGroupId,
+ s"Spark Connect - ${StringUtils.abbreviate(debugString, 128)}",
Review Comment:
Certainly, not related to this PR at all.
--
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]