Skip to content

Commit a820ca1

Browse files
rxinAndrew Or
authored and
Andrew Or
committed
[SPARK-2331] SparkContext.emptyRDD should return RDD[T] not EmptyRDD[T]
Author: Reynold Xin <[email protected]> Closes #10394 from rxin/SPARK-2331.
1 parent b0849b8 commit a820ca1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

core/src/main/scala/org/apache/spark/SparkContext.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -1248,7 +1248,7 @@ class SparkContext(config: SparkConf) extends Logging with ExecutorAllocationCli
12481248
}
12491249

12501250
/** Get an RDD that has no partitions or elements. */
1251-
def emptyRDD[T: ClassTag]: EmptyRDD[T] = new EmptyRDD[T](this)
1251+
def emptyRDD[T: ClassTag]: RDD[T] = new EmptyRDD[T](this)
12521252

12531253
// Methods for creating shared variables
12541254

project/MimaExcludes.scala

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ import com.typesafe.tools.mima.core.ProblemFilters._
3434
object MimaExcludes {
3535
def excludes(version: String) = version match {
3636
case v if v.startsWith("2.0") =>
37+
Seq(
38+
ProblemFilters.exclude[IncompatibleResultTypeProblem]("org.apache.spark.SparkContext.emptyRDD")
39+
) ++
3740
// When 1.6 is officially released, update this exclusion list.
3841
Seq(
3942
MimaBuild.excludeSparkPackage("deploy"),

0 commit comments

Comments
 (0)