Skip to content

Commit

Permalink
Merge pull request apache#343 from jeremyjliu/jl/expose-r-backend
Browse files Browse the repository at this point in the history
Move RBackend to member variable
  • Loading branch information
amenck authored Mar 29, 2018
2 parents 5d88c95 + 44a14cd commit 5774deb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/src/main/scala/org/apache/spark/deploy/RRunner.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ import org.apache.spark.util.RedirectThread
* subprocess and then has it connect back to the JVM to access system properties etc.
*/
object RRunner extends CondaRunner with Logging {
val sparkRBackend = new RBackend()

override def run(args: Array[String], maybeConda: Option[CondaEnvironment]): Unit = {
val rFile = PythonRunner.formatPath(args(0))

Expand Down Expand Up @@ -84,7 +86,6 @@ object RRunner extends CondaRunner with Logging {

// Launch a SparkR backend server for the R process to connect to; this will let it see our
// Java system properties etc.
val sparkRBackend = new RBackend()
@volatile var sparkRBackendPort = 0
val initialized = new Semaphore(0)
val sparkRBackendThread = new Thread("SparkR backend") {
Expand Down

0 comments on commit 5774deb

Please sign in to comment.