Skip to content
Closed
Changes from 2 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 @@ -18,6 +18,7 @@
package org.apache.spark.sql.hive.thriftserver

import scala.collection.JavaConversions._
import scala.math._

import org.apache.commons.lang.exception.ExceptionUtils
import org.apache.hadoop.hive.metastore.api.{FieldSchema, Schema}
Expand Down Expand Up @@ -53,6 +54,8 @@ private[hive] abstract class AbstractSparkSQLDriver(
override def run(command: String): CommandProcessorResponse = {
// TODO unify the error code
try {
val groupId = round(random * 1000000).toString
context.sparkContext.setJobGroup(groupId, command)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about just using the function that only sets the job description. I know it is deprecated, but @rxin is the one who deprecated it and says that we won't remove it.

@rxin should we undeprecate that function too BTW?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or to use setLocalProperty(SparkContext.SPARK_JOB_DESCRIPTION, description) ?setJobDescription essentially calls it.

val execution = context.executePlan(context.sql(command).logicalPlan)
hiveResponse = execution.stringResult()
tableSchema = getResultSetSchema(execution)
Expand Down