75

Spark“并行”写 | 一根笨茄子

 6 years ago
source link: http://blog.guoyb.com/2018/04/21/spark-scala-future/?
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
spark本来已经是一个分布式的计算平台,按说不应该手工去处理并行/异步的事情。但是,最近我实现的一个spark任务,需要一次写出数十个分区的数据,虽然这些分区的数据之间完全独立,但坑爹的是,基础数据平台提供的写数据接口只支持同步的一次写一个分区的数据。这样造成的结果就是,用循环来实现时,虽然我有很多个计算节点,数据(RDD)也分布于各个节点之上,但是我只能等一个分区写完成后,再写下一个分区:因

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK