From 0e2405490f2056728d1353abbac6f3ea177ae533 Mon Sep 17 00:00:00 2001 From: Sean Owen Date: Thu, 16 Feb 2017 12:32:45 +0000 Subject: [SPARK-19550][BUILD][CORE][WIP] Remove Java 7 support - Move external/java8-tests tests into core, streaming, sql and remove - Remove MaxPermGen and related options - Fix some reflection / TODOs around Java 8+ methods - Update doc references to 1.7/1.8 differences - Remove Java 7/8 related build profiles - Update some plugins for better Java 8 compatibility - Fix a few Java-related warnings For the future: - Update Java 8 examples to fully use Java 8 - Update Java tests to use lambdas for simplicity - Update Java internal implementations to use lambdas ## How was this patch tested? Existing tests Author: Sean Owen Closes #16871 from srowen/SPARK-19493. --- docs/mllib-statistics.md | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'docs/mllib-statistics.md') diff --git a/docs/mllib-statistics.md b/docs/mllib-statistics.md index 430c069045..c29400af85 100644 --- a/docs/mllib-statistics.md +++ b/docs/mllib-statistics.md @@ -317,12 +317,7 @@ JavaSparkContext jsc = ... // standard normal distribution `N(0, 1)`, evenly distributed in 10 partitions. JavaDoubleRDD u = normalJavaRDD(jsc, 1000000L, 10); // Apply a transform to get a random double RDD following `N(1, 4)`. -JavaDoubleRDD v = u.map( - new Function() { - public Double call(Double x) { - return 1.0 + 2.0 * x; - } - }); +JavaDoubleRDD v = u.mapToDouble(x -> 1.0 + 2.0 * x); {% endhighlight %} -- cgit v1.2.3