【文件属性】:
文件名称:Apache Spark源码读解
文件大小:401KB
文件格式:DOCX
更新时间:2020-11-30 11:04:50
Spark
class WordCount{
def main(args:Array[String]):Unit={
val conf =new SparkConf().setAppName("test").setMaster("local")
val sc =new SparkContext(conf)
sc.textFile(“”)
.flatMap(_.split(", "))
.map((_.1))
.reduceByKey(_+_)
.saveAsText("")
}
}