如何在Master上存储文本文件? [英] How to store the text file on the Master?

查看:27
本文介绍了如何在Master上存储文本文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用独立集群来运行 ALS 算法.使用以下方法将预测存储到文本文件中:

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

saveAsTextFile(path)

但是文本文件被存储在集群上.我想将文本文件存储在 Master 上.

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

推荐答案

这是预期的行为.path 在它的机器上解析被处决了,奴隶.我建议要么使用集群 FS(例如 HDFS)或 .collect() 您的数据,以便您可以将它们保存在本地大师.如果您的数据很大,请注意 OOM.

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.

这篇关于如何在Master上存储文本文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆