How to store the text file on the Master?

帅比萌擦擦* 提交于 2019-12-13 02:38:12

问题


I am using Standalone clusters to run the ALS algorithm. The predictions are being stored to the textfile using:

saveAsTextFile(path)

But the text file is being stored on the clusters. I want to store the text file on the Master.


回答1:


That is expected behavior. path is resolved on the machine it is executed, the slaves. I'd recommend to either use a cluster FS (e.g. HDFS) or .collect() your data so you can save them locally on the master. Beware of OOM if your data is large.



来源:https://stackoverflow.com/questions/36197852/how-to-store-the-text-file-on-the-master

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!