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/04/02 12:59:05 UTC

[GitHub] [spark] srowen commented on a change in pull request #23895: [SPARK-26992][STS] Fix STS scheduler pool correct delivery

srowen commented on a change in pull request #23895: [SPARK-26992][STS] Fix STS scheduler pool correct delivery
URL: https://github.com/apache/spark/pull/23895#discussion_r271289122
 
 

 ##########
 File path: sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala
 ##########
 @@ -291,6 +287,20 @@ private[hive] class SparkExecuteStatementOperation(
       sqlContext.sparkContext.cancelJobGroup(statementId)
     }
   }
+
+  private def withSchedulerPool[T](body: => T): T = {
+    val pool = sessionToActivePool.get(parentSession.getSessionHandle)
+    if (pool != null) {
 
 Review comment:
   Although this looks like it undoes the previous fix, you're saying it will always be null when this method starts right? It seems easier to unconditionally set it, unless there's some overhead I'm missing

----------------------------------------------------------------
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