Skip to content

Commit a8fe8b0

Browse files
committed
address comments
1 parent ace2fbc commit a8fe8b0

File tree

3 files changed

+3
-4
lines changed

3 files changed

+3
-4
lines changed

mllib/src/test/scala/org/apache/spark/ml/recommendation/ALSSuite.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -772,15 +772,13 @@ class ALSCleanerSuite extends SparkFunSuite {
772772
FileUtils.listFiles(localDir, TrueFileFilter.INSTANCE, TrueFileFilter.INSTANCE).asScala.toSet
773773
try {
774774
conf.set("spark.local.dir", localDir.getAbsolutePath)
775-
val sc = new SparkContext("local[2]", "test", conf)
775+
val sc = new SparkContext("local[2]", "ALSCleanerSuite", conf)
776776
try {
777777
sc.setCheckpointDir(checkpointDir.getAbsolutePath)
778778
// Generate test data
779779
val (training, _) = ALSSuite.genImplicitTestData(sc, 20, 5, 1, 0.2, 0)
780780
// Implicitly test the cleaning of parents during ALS training
781781
val spark = SparkSession.builder
782-
.master("local[2]")
783-
.appName("ALSCleanerSuite")
784782
.sparkContext(sc)
785783
.getOrCreate()
786784
import spark.implicits._

mllib/src/test/scala/org/apache/spark/ml/tree/impl/TreeTests.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ private[ml] object TreeTests extends SparkFunSuite {
4343
categoricalFeatures: Map[Int, Int],
4444
numClasses: Int): DataFrame = {
4545
val spark = SparkSession.builder()
46-
.appName("TreeTests")
4746
.sparkContext(data.sparkContext)
4847
.getOrCreate()
4948
import spark.implicits._

sql/core/src/main/scala/org/apache/spark/sql/SparkSession.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,8 @@ object SparkSession {
757757

758758
private[this] var userSuppliedContext: Option[SparkContext] = None
759759

760+
// The `SparkConf` inside the given `SparkContext` may get changed if you specify some options
761+
// for this builder.
760762
private[spark] def sparkContext(sparkContext: SparkContext): Builder = synchronized {
761763
userSuppliedContext = Option(sparkContext)
762764
this

0 commit comments

Comments
 (0)