[英]Scala Spark write string to file
You would just need to call collect on the RDD to bring the collection back to the driver. 您只需要在RDD上调用collect即可将集合返回给驱动程序。 Then you can write it to the file system on the driver. 然后,您可以将其写入驱动程序上的文件系统。
Although it would be recommended to write it in a parallelized fashion for performance. 尽管建议以并行方式编写它以提高性能。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.