92
edits
Changes
→RDD APIs
// map from one RDD to another RDD
JavaRDD<Double> mapRDD = javaRDD.map(value -> Math.sqrt(value));
// Output: 3.3166247903554, 4.69041575982343, 5.744562646538029, 6.6332495807108
mapRDD.foreach(value->System.out.println(value));
//use filter
JavaRDD<Double> filterRDD = javaRDD.filter(value ->value>=30);
filterRDD.foreach(value->System.out.println(value));