如何存储在主服务器上的文本文件?
问题描述:
我使用的独立集群来运行ALS算法。在predictions正在使用存储在文本文件:
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.
答
这是预期的行为。 路径
是计算机它解决
被执行,则奴隶。我建议要么使用群集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.