You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/05/30 17:15:13 UTC

[GitHub] [spark] juliuszsompolski commented on a change in pull request #24659: [SPARK-27788][SQL] Session aware event log for Spark thrift server

juliuszsompolski commented on a change in pull request #24659: [SPARK-27788][SQL] Session aware event log for Spark thrift server
URL: https://github.com/apache/spark/pull/24659#discussion_r289085229
 
 

 ##########
 File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkSQLSessionManager.scala
 ##########
 @@ -63,16 +60,22 @@ private[hive] class SparkSQLSessionManager(hiveServer: HiveServer2, sqlContext:
     } else {
       sqlContext.newSession()
     }
+    sqlContext.sparkContext.setLocalProperty(
+      SQLContext.SESSION_ID_KEY, sessionHandle.getSessionId.toString)
 
 Review comment:
   I think setting it in a thread local in open session is not enough, as I think that each request in the session can be handled by different threads of the connection threadpool.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org