shaofengshi closed pull request #403: Kylin 3726: KylinSession should load 
spark properties from spark-defaults.conf
URL: https://github.com/apache/kylin/pull/403
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/engine-spark/src/main/java/org/apache/spark/sql/KylinSession.scala 
b/engine-spark/src/main/java/org/apache/spark/sql/KylinSession.scala
index 72c4ba5f6b..663f6c91bb 100644
--- a/engine-spark/src/main/java/org/apache/spark/sql/KylinSession.scala
+++ b/engine-spark/src/main/java/org/apache/spark/sql/KylinSession.scala
@@ -30,7 +30,7 @@ import org.apache.spark.scheduler.{SparkListener, 
SparkListenerApplicationEnd}
 import org.apache.spark.sql.SparkSession.Builder
 import org.apache.spark.sql.internal.{SessionState, SharedState}
 import org.apache.spark.sql.manager.UdfManager
-import org.apache.spark.util.{KylinReflectUtils, XmlUtils}
+import org.apache.spark.util.{KylinReflectUtils, Utils, XmlUtils}
 import org.apache.spark.{SparkConf, SparkContext}
 
 import scala.collection.JavaConverters._
@@ -133,7 +133,8 @@ object KylinSession extends Logging {
 
     def initSparkConf(): SparkConf = {
       val sparkConf = new SparkConf()
-
+      logInfo("Try to load spark properties from spark-defaults.conf")
+      Utils.loadDefaultSparkProperties(sparkConf)
       kylinConfig.getSparkConf.asScala.foreach {
         case (k, v) =>
           sparkConf.set(k, v)


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to