test
来源:互联网 发布:java多线程日志输出 编辑:程序博客网 时间:2024/06/01 10:21
object WordCount { def main(args:Array[String]): Unit ={ val sparkConf = new SparkConf().setMaster("Master:7077").setAppName("WordCount") val ssc = new StreamingContext(sparkConf,Seconds(1)) val lines = ssc.socketTextStream("Master",9999) val words = lines.flatMap(_.split(" ")) val wordCounts = words.map(x => (x,1)).reduceByKey(_+_) wordCounts.print() ssc.start() ssc.awaitTermination() }}
<strong>格式测试</strong>
0 0
- test
- test
- test
- test
- test
- test
- test
- Test
- test
- Test
- test
- test
- test
- test
- test
- test
- test
- Test
- scp 是我小看了你---基于密钥传输!
- Haskell 常用方法
- C/C++函数的基本问题
- android ImageLoader加载本地图片的工具类
- JQuery选择器中的可见性筛选
- test
- CodeForces 366A Dima and Guards(结构体,数学)
- HDU 2612 Find a way(BFS)
- NKOI 3559 子串
- Android官方MVP架构示例项目解析
- 机器学习 -- 多元回归实现实例
- C语言执行shellcode的五种方法
- 由Tomcat 8005端口想到的...
- 安卓小案例收集一