diff options
Diffstat (limited to 'external')
-rw-r--r-- | external/java8-tests/src/test/java/test/org/apache/spark/java8/Java8RDDAPISuite.java (renamed from external/java8-tests/src/test/java/org/apache/spark/Java8APISuite.java) | 8 | ||||
-rw-r--r-- | external/java8-tests/src/test/java/test/org/apache/spark/java8/dstream/Java8APISuite.java (renamed from external/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java) | 3 | ||||
-rw-r--r-- | external/java8-tests/src/test/java/test/org/apache/spark/java8/sql/Java8DatasetAggregatorSuite.java (renamed from external/java8-tests/src/test/java/org/apache/spark/sql/Java8DatasetAggregatorSuite.java) | 7 | ||||
-rw-r--r-- | external/java8-tests/src/test/scala/test/org/apache/spark/java8/JDK8ScalaSuite.scala (renamed from external/java8-tests/src/test/scala/org/apache/spark/JDK8ScalaSuite.scala) | 5 |
4 files changed, 15 insertions, 8 deletions
diff --git a/external/java8-tests/src/test/java/org/apache/spark/Java8APISuite.java b/external/java8-tests/src/test/java/test/org/apache/spark/java8/Java8RDDAPISuite.java index 6ac5ca9cf5..8ee0e7e415 100644 --- a/external/java8-tests/src/test/java/org/apache/spark/Java8APISuite.java +++ b/external/java8-tests/src/test/java/test/org/apache/spark/java8/Java8RDDAPISuite.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.spark; +package test.org.apache.spark.java8; import java.io.File; import java.io.Serializable; @@ -33,6 +33,8 @@ import org.junit.Assert; import org.junit.Before; import org.junit.Test; +import org.apache.spark.Accumulator; +import org.apache.spark.AccumulatorParam; import org.apache.spark.api.java.JavaDoubleRDD; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; @@ -45,8 +47,8 @@ import org.apache.spark.util.Utils; * Most of these tests replicate org.apache.spark.JavaAPISuite using java 8 * lambda syntax. */ -public class Java8APISuite implements Serializable { - static int foreachCalls = 0; +public class Java8RDDAPISuite implements Serializable { + private static int foreachCalls = 0; private transient JavaSparkContext sc; @Before diff --git a/external/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java b/external/java8-tests/src/test/java/test/org/apache/spark/java8/dstream/Java8APISuite.java index d0fed303e6..cf5607f5e8 100644 --- a/external/java8-tests/src/test/java/org/apache/spark/streaming/Java8APISuite.java +++ b/external/java8-tests/src/test/java/test/org/apache/spark/java8/dstream/Java8APISuite.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package org.apache.spark.streaming; +package test.org.apache.spark.java8.dstream; import java.io.Serializable; import java.util.*; @@ -33,6 +33,7 @@ import org.apache.spark.api.java.Optional; import org.apache.spark.api.java.JavaPairRDD; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api.java.function.PairFunction; +import org.apache.spark.streaming.*; import org.apache.spark.streaming.api.java.JavaDStream; import org.apache.spark.streaming.api.java.JavaPairDStream; import org.apache.spark.streaming.api.java.JavaMapWithStateDStream; diff --git a/external/java8-tests/src/test/java/org/apache/spark/sql/Java8DatasetAggregatorSuite.java b/external/java8-tests/src/test/java/test/org/apache/spark/java8/sql/Java8DatasetAggregatorSuite.java index 1a2aea67d9..10d25fa445 100644 --- a/external/java8-tests/src/test/java/org/apache/spark/sql/Java8DatasetAggregatorSuite.java +++ b/external/java8-tests/src/test/java/test/org/apache/spark/java8/sql/Java8DatasetAggregatorSuite.java @@ -15,7 +15,7 @@ * limitations under the License. */ -package test.org.apache.spark.sql.sources; +package test.org.apache.spark.java8.sql; import java.util.Arrays; @@ -26,6 +26,7 @@ import scala.Tuple2; import org.apache.spark.sql.Dataset; import org.apache.spark.sql.KeyValueGroupedDataset; import org.apache.spark.sql.expressions.javalang.typed; +import test.org.apache.spark.sql.JavaDatasetAggregatorSuiteBase; /** * Suite that replicates tests in JavaDatasetAggregatorSuite using lambda syntax. @@ -42,7 +43,7 @@ public class Java8DatasetAggregatorSuite extends JavaDatasetAggregatorSuiteBase public void testTypedAggregationCount() { KeyValueGroupedDataset<String, Tuple2<String, Integer>> grouped = generateGroupedDataset(); Dataset<Tuple2<String, Long>> agged = grouped.agg(typed.count(v -> v)); - Assert.assertEquals(Arrays.asList(tuple2("a", 2), tuple2("b", 1)), agged.collectAsList()); + Assert.assertEquals(Arrays.asList(tuple2("a", 2L), tuple2("b", 1L)), agged.collectAsList()); } @Test @@ -56,6 +57,6 @@ public class Java8DatasetAggregatorSuite extends JavaDatasetAggregatorSuiteBase public void testTypedAggregationSumLong() { KeyValueGroupedDataset<String, Tuple2<String, Integer>> grouped = generateGroupedDataset(); Dataset<Tuple2<String, Long>> agged = grouped.agg(typed.sumLong(v -> (long)v._2())); - Assert.assertEquals(Arrays.asList(tuple2("a", 3), tuple2("b", 3)), agged.collectAsList()); + Assert.assertEquals(Arrays.asList(tuple2("a", 3L), tuple2("b", 3L)), agged.collectAsList()); } } diff --git a/external/java8-tests/src/test/scala/org/apache/spark/JDK8ScalaSuite.scala b/external/java8-tests/src/test/scala/test/org/apache/spark/java8/JDK8ScalaSuite.scala index fa0681db41..c4042e47e8 100644 --- a/external/java8-tests/src/test/scala/org/apache/spark/JDK8ScalaSuite.scala +++ b/external/java8-tests/src/test/scala/test/org/apache/spark/java8/JDK8ScalaSuite.scala @@ -15,7 +15,10 @@ * limitations under the License. */ -package org.apache.spark +package test.org.apache.spark.java8 + +import org.apache.spark.SharedSparkContext +import org.apache.spark.SparkFunSuite /** * Test cases where JDK8-compiled Scala user code is used with Spark. |