Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,12 @@ private[connect] class ExecuteThreadRunner(executeHolder: ExecuteHolder) extends
s"Spark Connect - ${Utils.abbreviate(debugString, 128)}")
session.sparkContext.setInterruptOnCancel(true)

val sessionUser = executeHolder.sessionHolder.userId
if (sessionUser != null && sessionUser.nonEmpty) {
session.sparkContext.setLocalProperty(
SparkConnectService.SPARK_CONNECT_SESSION_USER_KEY, sessionUser)
}

// Add debug information to the query execution so that the jobs are traceable.
session.sparkContext.setLocalProperty(
"callSite.short",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,8 @@ class SparkConnectService(debug: Boolean) extends AsyncService with BindableServ
*/
object SparkConnectService extends Logging {

private[connect] val SPARK_CONNECT_SESSION_USER_KEY: String = "spark.connect.session.user"

private[connect] var server: Server = _
private[connect] var bindingAddress: InetSocketAddress = _

Expand Down