简体   繁体   English

spark:纱线簇模式无法读取hdfs路径(无此类文件或目录)

[英]spark: yarn cluster mode can't read hdfs path (No such file or directory)

I'm using spark submit in yarn mode, but I'm getting this error: 我在纱线模式下使用Spark Submit,但是出现此错误:

Apparently my input path hdfs:// is missing one '/' 显然我的输入路径hdfs://缺少一个'/'
I'm passing hdfs://master:8020/usr/jimmy/Test/ , but the log output is hdfs:/master:8020/usr/jimmy/Test/Personal1 in the log file (the Personal1 is specified in my code) 我正在传递hdfs://master:8020/usr/jimmy/Test/ ,但日志输出为日志文件中的hdfs:/master:8020/usr/jimmy/Test/Personal1 (在我的代码中指定了Personal1
The missing '/' is obviously the problem 缺少的'/'显然是问题所在
What can I do? 我能做什么?

Please help me 请帮我

My command: 我的命令:

./bin/spark-submit --master yarn-cluster --class Movie.Movies /usr/jimmy/Move.jar hdfs://master:8020/usr/jimmy/Test/  hdfs://usr/jimmy/result 

Hadoop log: Hadoop日志:

15/09/08 16:33:54 ERROR yarn.ApplicationMaster: User class threw exception: hdfs:/master:8020/usr/jimmy/Test/Personal1 (No such file or directory)
java.io.FileNotFoundException: hdfs:/master:8020/usr/jimmy/Test/Personal1 (No such file or directory)

Update: I see this on spark official site.Does it means I have to use ntfs ??? 更新:我在Spark官方网站上看到了这,这意味着我必须使用ntfs ???
My thought is : master and worker both can read file on hdfs path.And I try ( hdfs ls ) is OK. 我的想法是: masterworker都可以读取hdfs路径上的文件,然后我尝试( hdfs ls )可以。 But I don't know why my execution has error. 但是我不知道为什么我的执行有错误。
Please guide me 请指导我

Do I need Hadoop to run Spark?

No, but if you run on a cluster, you will need some form of shared file system (for example, NFS mounted at the same path on each node). If you have this type of filesystem, you can just deploy Spark in standalone mode.

The job is trying to access the input file Personal1 on hdfs. 作业正在尝试访问hdfs上的输入文件Personal1。
Please check if you have configured the hdfs and pushed the file on it. 请检查是否已配置hdfs并将文件推送到其中。

If yes, then try to locate Personal1 file through HDFS Web UI on this path /usr/jimmy/Test/ 如果是,则尝试通过HDFS Web UI在此路径/ usr / jimmy / Test /上找到Personal1文件。
example: http://master:50070/explorer.html#/usr/jimmy/Test/ 示例: http:// master:50070 / explorer.html#/ usr / jimmy / Test /

If you are able to locate the file then your job should locate the file as well. 如果您能够找到该文件,那么您的工作也应该找到该文件。

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

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