Skip to content

Commit

Permalink
use spark.app.name priority.
Browse files Browse the repository at this point in the history
  • Loading branch information
watermen committed Jun 26, 2015
1 parent c337844 commit e3d7647
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ private[hive] object SparkSQLEnv extends Logging {
val sparkConf = new SparkConf(loadDefaults = true)
val maybeSerializer = sparkConf.getOption("spark.serializer")
val maybeKryoReferenceTracking = sparkConf.getOption("spark.kryo.referenceTracking")
val maybeAppName = sparkConf.getOption("spark.app.name")
.filter(!_.equals("org.apache.spark.sql.hive.thriftserver.SparkSQLCLIDriver"))

sparkConf
.setAppName(s"SparkSQL::${Utils.localHostName()}")
.setAppName(maybeAppName.getOrElse(s"SparkSQL::${Utils.localHostName()}"))
.set(
"spark.serializer",
maybeSerializer.getOrElse("org.apache.spark.serializer.KryoSerializer"))
Expand Down

0 comments on commit e3d7647

Please sign in to comment.