spark算子实战(二)
来源:互联网 发布:linux json 编辑:程序博客网 时间:2024/06/06 05:56
前面介绍了Value型Transformation算子,这里我们将继续介绍Key-Value型Transformation算子和Actions算子。
Key-Value型的Transformation算子
1.mapValues
实例1
scala代码
这里写代码片
结果:
python代码
这里写代码片
结果:
2.mapValues
实例1
scala代码
这里写代码片
结果:
python代码
这里写代码片
结果:
3.mapValues
实例1
scala代码
这里写代码片
结果:
python代码
这里写代码片
结果:
阅读全文