Spark基础docx

上传:风惜云 浏览: 87 推荐: 0 文件:DOCX 大小:1.3MB 上传时间:2019-01-21 23:28:35 版权申诉
4.2.2. 在spark shell中编写WordCount程序 1.首先启动hdfs 2.向hdfs上传一个文件到hdfs://node1.itcast.cn:9000/words.txt 3.在spark shell中用scala语言编写spark程序 sc.textFile("hdfs://node1.itcast.cn:9000/words.txt").flatMap(_.split(" ")) .map((_,1)).reduceByKey(_+_).saveAsTextFile("hdfs://node1.itcast.cn:9000/out")
上传资源
用户评论

suffice_71450 2019-01-21 23:28:35

入门勉强能看