File tree Expand file tree Collapse file tree 1 file changed +2
-11
lines changed
sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver Expand file tree Collapse file tree 1 file changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -34,17 +34,8 @@ object SparkSQLEnv extends Logging {
3434
3535 def init () {
3636 if (hiveContext == null ) {
37- val jobName : String = " SparkSQL::" + java.net.InetAddress .getLocalHost.getHostName
38- val master : String = System .getenv(" MASTER" )
39-
40- sparkContext = {
41- val sparkConf = new SparkConf ()
42- .setMaster(Option (master).getOrElse(" local" ))
43- .setAppName(jobName)
44-
45- Option (System .getenv(" SPARK_HOME" )).foreach(sparkConf.setSparkHome)
46- new SparkContext (sparkConf, Map [String , Set [SplitInfo ]]())
47- }
37+ sparkContext = new SparkContext (new SparkConf ()
38+ .setAppName(s " SparkSQL:: ${java.net.InetAddress .getLocalHost.getHostName}" ))
4839
4940 sparkContext.addSparkListener(new StatsReportListener ())
5041
You can’t perform that action at this time.
0 commit comments