擅长:python、mysql、java
<p>首先,我不认为有任何理由放弃sparktest.m。
其次,推荐的方法是将它们放入.zip文件中。根据文档:</p>
<blockquote>
<p>For Python, you can use the py-files argument of spark-submit to add
.py, .zip or .egg files to be distributed with your application. If
you depend on multiple Python files we recommend packaging them into a
.zip or .egg.</p>
</blockquote>
<p>最后,请记住,您的函数将在远程m/c中的executor jvm中执行,因此Spark framework会将函数、闭包和附加文件作为作业的一部分。希望有帮助。在</p>