diff options
author | Kay Ousterhout <kayousterhout@gmail.com> | 2015-02-19 10:03:56 +0800 |
---|---|---|
committer | Cheng Lian <lian@databricks.com> | 2015-02-19 10:03:56 +0800 |
commit | f6ee80b1885cb3822c52a4aa92ea0115c991e43f (patch) | |
tree | cbcc9e37ff96f4f413daf94d30cf76e0d8708344 /sql/hive-thriftserver/v0.13.1/src/main/scala | |
parent | 36e15b48ead360f8b870606add5cf0f7d639f126 (diff) | |
download | spark-f6ee80b1885cb3822c52a4aa92ea0115c991e43f.tar.gz spark-f6ee80b1885cb3822c52a4aa92ea0115c991e43f.tar.bz2 spark-f6ee80b1885cb3822c52a4aa92ea0115c991e43f.zip |
[SPARK-5846] Correctly set job description and pool for SQL jobs
This is #4630 but modified for the 1.2 branch, because I'm guessing it makes sense to fix this issue in that branch (again, unless I missed something obvious here...)
Author: Kay Ousterhout <kayousterhout@gmail.com>
Closes #4631 from kayousterhout/SPARK-5846_1.2.1 and squashes the following commits:
ffe8ff2 [Kay Ousterhout] [SPARK-5846] Correctly set job description and pool for SQL jobs
Diffstat (limited to 'sql/hive-thriftserver/v0.13.1/src/main/scala')
-rw-r--r-- | sql/hive-thriftserver/v0.13.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/Shim13.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/hive-thriftserver/v0.13.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/Shim13.scala b/sql/hive-thriftserver/v0.13.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/Shim13.scala index 17f1ad3e46..5519db15f4 100644 --- a/sql/hive-thriftserver/v0.13.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/Shim13.scala +++ b/sql/hive-thriftserver/v0.13.1/src/main/scala/org/apache/spark/sql/hive/thriftserver/Shim13.scala @@ -157,6 +157,11 @@ private[hive] class SparkExecuteStatementOperation( def run(): Unit = { logInfo(s"Running query '$statement'") setState(OperationState.RUNNING) + val groupId = round(random * 1000000).toString + hiveContext.sparkContext.setJobGroup(groupId, statement) + sessionToActivePool.get(parentSession).foreach { pool => + hiveContext.sparkContext.setLocalProperty("spark.scheduler.pool", pool) + } try { result = hiveContext.sql(statement) logDebug(result.queryExecution.toString()) @@ -167,11 +172,6 @@ private[hive] class SparkExecuteStatementOperation( case _ => } - val groupId = round(random * 1000000).toString - hiveContext.sparkContext.setJobGroup(groupId, statement) - sessionToActivePool.get(parentSession).foreach { pool => - hiveContext.sparkContext.setLocalProperty("spark.scheduler.pool", pool) - } iter = { val useIncrementalCollect = hiveContext.getConf("spark.sql.thriftServer.incrementalCollect", "false").toBoolean |