aboutsummaryrefslogtreecommitdiff
path: root/unsafe
diff options
context:
space:
mode:
authorReynold Xin <rxin@databricks.com>2015-08-02 17:54:30 -0700
committerReynold Xin <rxin@databricks.com>2015-08-02 17:54:30 -0700
commit9d03ad910b853c1e0dcb946b05d48ab36a1ac533 (patch)
treed9dad2589910c325f71c0e653130cfdd67817849 /unsafe
parent0722f43316fc7ed0c1308b0f9d6d15f0c22ed56f (diff)
downloadspark-9d03ad910b853c1e0dcb946b05d48ab36a1ac533.tar.gz
spark-9d03ad910b853c1e0dcb946b05d48ab36a1ac533.tar.bz2
spark-9d03ad910b853c1e0dcb946b05d48ab36a1ac533.zip
[SPARK-9543][SQL] Add randomized testing for UnsafeKVExternalSorter.
The detailed approach is documented in UnsafeKVExternalSorterSuite.testKVSorter(), working as follows: 1. Create input by generating data randomly based on the given key/value schema (which is also randomly drawn from a list of candidate types) 2. Run UnsafeKVExternalSorter on the generated data 3. Collect the output from the sorter, and make sure the keys are sorted in ascending order 4. Sort the input by both key and value, and sort the sorter output also by both key and value. Compare the sorted input and sorted output together to make sure all the key/values match. 5. Check memory allocation to make sure there is no memory leak. There is also a spill flag. When set to true, the sorter will spill probabilistically roughly every 100 records. Author: Reynold Xin <rxin@databricks.com> Closes #7873 from rxin/kvsorter-randomized-test and squashes the following commits: a08c251 [Reynold Xin] Resource cleanup. 0488b5c [Reynold Xin] [SPARK-9543][SQL] Add randomized testing for UnsafeKVExternalSorter.
Diffstat (limited to 'unsafe')
-rw-r--r--unsafe/src/test/java/org/apache/spark/unsafe/types/CalendarIntervalSuite.java (renamed from unsafe/src/test/java/org/apache/spark/unsafe/types/IntervalSuite.java)2
1 files changed, 1 insertions, 1 deletions
diff --git a/unsafe/src/test/java/org/apache/spark/unsafe/types/IntervalSuite.java b/unsafe/src/test/java/org/apache/spark/unsafe/types/CalendarIntervalSuite.java
index e6733a7aae..6274b92b47 100644
--- a/unsafe/src/test/java/org/apache/spark/unsafe/types/IntervalSuite.java
+++ b/unsafe/src/test/java/org/apache/spark/unsafe/types/CalendarIntervalSuite.java
@@ -22,7 +22,7 @@ import org.junit.Test;
import static junit.framework.Assert.*;
import static org.apache.spark.unsafe.types.CalendarInterval.*;
-public class IntervalSuite {
+public class CalendarIntervalSuite {
@Test
public void equalsTest() {