aboutsummaryrefslogtreecommitdiff
path: root/core/src/test
diff options
context:
space:
mode:
authorPatrick Wendell <pwendell@gmail.com>2014-05-13 23:24:51 -0700
committerPatrick Wendell <pwendell@gmail.com>2014-05-13 23:24:51 -0700
commit7bb9a521f35eb19576c6cc2da3fd385910270e46 (patch)
treec07844990d8d4e99eb25e89a38a12af9bdf9ac64 /core/src/test
parentc33b8dcbf65a3a0c5ee5e65cd1dcdbc7da36aa5f (diff)
downloadspark-7bb9a521f35eb19576c6cc2da3fd385910270e46.tar.gz
spark-7bb9a521f35eb19576c6cc2da3fd385910270e46.tar.bz2
spark-7bb9a521f35eb19576c6cc2da3fd385910270e46.zip
Revert "[SPARK-1784] Add a new partitioner to allow specifying # of keys per partition"
This reverts commit 92cebada09a7e5a00ab48bcb350a9462949c33eb.
Diffstat (limited to 'core/src/test')
-rw-r--r--core/src/test/scala/org/apache/spark/PartitioningSuite.scala34
1 files changed, 0 insertions, 34 deletions
diff --git a/core/src/test/scala/org/apache/spark/PartitioningSuite.scala b/core/src/test/scala/org/apache/spark/PartitioningSuite.scala
index 7d40395803..7c30626a0c 100644
--- a/core/src/test/scala/org/apache/spark/PartitioningSuite.scala
+++ b/core/src/test/scala/org/apache/spark/PartitioningSuite.scala
@@ -66,40 +66,6 @@ class PartitioningSuite extends FunSuite with SharedSparkContext with PrivateMet
assert(descendingP4 != p4)
}
- test("BoundaryPartitioner equality") {
- // Make an RDD where all the elements are the same so that the partition range bounds
- // are deterministically all the same.
- val rdd = sc.parallelize(1.to(4000)).map(x => (x, x))
-
- val p2 = new BoundaryPartitioner(2, rdd, 1000)
- val p4 = new BoundaryPartitioner(4, rdd, 1000)
- val anotherP4 = new BoundaryPartitioner(4, rdd)
-
- assert(p2 === p2)
- assert(p4 === p4)
- assert(p2 != p4)
- assert(p4 != p2)
- assert(p4 === anotherP4)
- assert(anotherP4 === p4)
- }
-
- test("BoundaryPartitioner getPartition") {
- val rdd = sc.parallelize(1.to(2000)).map(x => (x, x))
- val partitioner = new BoundaryPartitioner(4, rdd, 500)
- 1.to(2000).map { element => {
- val partition = partitioner.getPartition(element)
- if (element <= 500) {
- assert(partition === 0)
- } else if (element > 501 && element <= 1000) {
- assert(partition === 1)
- } else if (element > 1001 && element <= 1500) {
- assert(partition === 2)
- } else if (element > 1501 && element <= 2000) {
- assert(partition === 3)
- }
- }}
- }
-
test("RangePartitioner getPartition") {
val rdd = sc.parallelize(1.to(2000)).map(x => (x, x))
// We have different behaviour of getPartition for partitions with less than 1000 and more than