Skip to content

Commit

Permalink
[SPARK-20088] Do not create new SparkContext in SparkR createSparkCon…
Browse files Browse the repository at this point in the history
…text

## What changes were proposed in this pull request?
Instead of creating new `JavaSparkContext` we use `SparkContext.getOrCreate`.

## How was this patch tested?
Existing tests

Author: Hossein <[email protected]>

Closes apache#17423 from falaki/SPARK-20088.
  • Loading branch information
falaki authored and mengxr committed Mar 27, 2017
1 parent 8904934 commit 0588dc7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/api/r/RRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ private[r] object RRDD {
.mkString(File.separator))
}

val jsc = new JavaSparkContext(sparkConf)
val jsc = new JavaSparkContext(SparkContext.getOrCreate(sparkConf))
jars.foreach { jar =>
jsc.addJar(jar)
}
Expand Down

0 comments on commit 0588dc7

Please sign in to comment.