![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
大数据
Zhen大虾
这个作者很懒,什么都没留下…
展开
-
Spark(二) RDD
Transformation:只记录要进行的运算,但不会真正进行运算–惰性机制 1. filter(func):筛选出满足函数func的元素,并返回新的数据集-lines.filter(line->line.contains('A')) 2. map(func):将每个元素传递到函数func中,并将结果返回作为一个新的数据集,rdd2=rdd1.map(x=>x+10) 3. flatmap(func):与map()相似,但每个输入元素都可以映射到0或多个输出结果 4. reduceByKe.翻译 2020-10-28 17:16:06 · 188 阅读 · 0 评论 -
PySpark笔记(一)
python on spark: 使用spark提供的pyspark库来编写spark应用程序 RDD: resilient distributed dataset transformations: map, flatMap,filter, distinct, reduceByKey,mapPartitions,sortBy actions: collect, collectAsMap, reduce, countByKey/countByValue, take, first ...翻译 2020-10-28 16:04:16 · 163 阅读 · 0 评论 -
Hive查询
#原始数据 user_id platform use_cnt is_active date_8 10600 2 46 1 20190101 10600 2 49 1 20190102 10600 2 11 1 20190103 #实现去重---group by SELECT user_id,platform,is_active FROM app.t_od_use_cnt W...翻译 2020-04-20 17:10:19 · 191 阅读 · 0 评论