aboutsummaryrefslogtreecommitdiff
path: root/core/src/test/scala
diff options
context:
space:
mode:
authorMatthew Taylor <matthew.t@tbfe.net>2013-11-19 10:48:48 +0000
committerMatthew Taylor <matthew.t@tbfe.net>2013-11-19 10:48:48 +0000
commitf639b65eabcc8666b74af8f13a37c5fdf7e0185f (patch)
tree3dceb303f0ae2eb8319a860e9788f6825fd304ba /core/src/test/scala
parent13b9bf494b0d1d0e65dc357efe832763127aefd2 (diff)
downloadspark-f639b65eabcc8666b74af8f13a37c5fdf7e0185f.tar.gz
spark-f639b65eabcc8666b74af8f13a37c5fdf7e0185f.tar.bz2
spark-f639b65eabcc8666b74af8f13a37c5fdf7e0185f.zip
PartitionPruningRDD is using index from parent(review changes)
Diffstat (limited to 'core/src/test/scala')
-rw-r--r--core/src/test/scala/org/apache/spark/rdd/PartitionPruningRDDSuite.scala (renamed from core/src/test/scala/org/apache/spark/PartitionPruningRDDSuite.scala)15
1 files changed, 4 insertions, 11 deletions
diff --git a/core/src/test/scala/org/apache/spark/PartitionPruningRDDSuite.scala b/core/src/test/scala/org/apache/spark/rdd/PartitionPruningRDDSuite.scala
index 28e71e835f..53a7b7c44d 100644
--- a/core/src/test/scala/org/apache/spark/PartitionPruningRDDSuite.scala
+++ b/core/src/test/scala/org/apache/spark/rdd/PartitionPruningRDDSuite.scala
@@ -15,11 +15,10 @@
* limitations under the License.
*/
-package org.apache.spark
+package org.apache.spark.rdd
import org.scalatest.FunSuite
-import org.apache.spark.SparkContext._
-import org.apache.spark.rdd.{PartitionPruningRDDPartition, RDD, PartitionPruningRDD}
+import org.apache.spark.{TaskContext, Partition, SharedSparkContext}
class PartitionPruningRDDSuite extends FunSuite with SharedSparkContext {
@@ -49,7 +48,7 @@ class PartitionPruningRDDSuite extends FunSuite with SharedSparkContext {
}
- test("Pruned Partitions can be merged ") {
+ test("Pruned Partitions can be unioned ") {
val rdd = new RDD[Int](sc, Nil) {
override protected def getPartitions = {
@@ -72,17 +71,11 @@ class PartitionPruningRDDSuite extends FunSuite with SharedSparkContext {
})
val merged = prunedRDD1 ++ prunedRDD2
-
assert(merged.count() == 2)
val take = merged.take(2)
-
assert(take.apply(0) == 4)
-
assert(take.apply(1) == 6)
-
-
}
-
}
class TestPartition(i: Int, value: Int) extends Partition with Serializable {
@@ -90,4 +83,4 @@ class TestPartition(i: Int, value: Int) extends Partition with Serializable {
def testValue = this.value
-} \ No newline at end of file
+}