简体   繁体   English

在zip中添加h5文件以与PySpark一起使用

[英]Adding h5 files in a zip to use with PySpark

I am using PySpark 1.6.1 for my spark application. 我将PySpark 1.6.1用于我的spark应用程序。 I have additional modules which I am loading using the argument --py-files . 我还有其他模块正在使用--py-files参数加载。 I also have a h5 file which I need to access from one of the modules for initializing the ApolloNet. 我还有一个h5文件,我需要从其中一个模块访问该文件以初始化ApolloNet。

Is there any way I could access those files from the modules if I put them in the same archive? 如果我将这些文件放在同一个存档中,有什么办法可以从模块访问这些文件? I tried this approach but it was throwing an error because the files are not there in every worker. 我尝试了这种方法,但是由于每个工作人员中都不存在文件,因此引发了错误。 I can think of copying the file to each of the workers but I want to know if there are better ways to do it? 我可以考虑将文件复制到每个工作人员,但是我想知道是否有更好的方法来执行此操作?

发现您可以通过使用spark-submit中的--files参数将其他文件添加到所有工作程序。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM