[英]Unable to read local files in spark kubernetes cluster mode
在火花集群模式程序中读取存储在系统中的文件时遇到问题。这给我一个错误,提示“找不到文件”,但是文件存在于定义的位置。请提出一些建议,以便我可以读取本地使用kubernetes在Spark集群中添加文件。
You cannot refer local files on your machine when you submit Spark on Kubernetes. 在Kubernetes上提交Spark时,无法在计算机上引用本地文件。
The available solutions for your case might be: 针对您的案例的可用解决方案可能是:
local:///path/to/your-file.jar
local:///path/to/your-file.jar
If you are running local Kubernetes cluster like Minikube you can also create a Kubernetes Volume with files you are interested in and mount it to the Spark Pods: refer docs . 如果您正在运行Minikube之类的本地Kubernetes集群,则还可以使用您感兴趣的文件创建一个Kubernetes Volume,并将其安装到Spark Pods:参考docs 。 Be sure to mount that volume to both Driver and Executors.
确保将该卷安装到驱动程序和执行器上。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.