dongjoon-hyun commented on a change in pull request #24353: [Spark-27446] Use 
existing spark conf if available.
URL: https://github.com/apache/spark/pull/24353#discussion_r274682857
 
 

 ##########
 File path: core/src/main/scala/org/apache/spark/api/r/RBackend.scala
 ##########
 @@ -47,7 +47,7 @@ private[spark] class RBackend {
   private[r] val jvmObjectTracker = new JVMObjectTracker
 
   def init(): (Int, RAuthHelper) = {
-    val conf = new SparkConf()
+    val conf = Option(SparkEnv.get).map(_.conf).getOrElse(new SparkConf())
 
 Review comment:
   Hi, @MrBago .
   Could you add a unit test case, please? That will prevent a future 
regression. Maybe, at `RBackendSuite.scala`?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to 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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to