A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/chhao01/rdd below:

chhao01/rdd: Simplify the Spark RDD (for Scala Learning Purpose)

基于Scala实现的完全模拟Spark RDD函数接口的代码.

package example

import org.apache.spark.SparkContext

object Example {
  def main(args: Array[String]) {
    val sc = SparkContext("local[4]", "test")
    println(sc.makeRDD(1 to 100).filter(_ % 2 == 1).count())
    sc.parallelize(1 to 30).groupBy(_ % 5).map { case (k, it) =>
      s"k => sum: ${it.sum}"
    }.foreach(println)
  }
}

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4