zl程序教程

您现在的位置是:首页 >  后端

当前栏目

sc.textFile("file:///home/spark/data.txt") Input path does not exist解决方法——submit 加参数 --master local 即可解决

方法Spark 解决 -- 参数 not File Data
2023-09-14 09:11:55 时间

use this val data = sc.textFile("/home/spark/data.txt") this should work and set master as local.

Input path does not exist解决方法

spark-submit --master local 即可解决!

 

参考:https://stackoverflow.com/questions/41339127/how-to-load-local-file-using-sc-textfile-in-spark

其他解决方法:https://stackoverflow.com/questions/35123245/load-local-file-not-hdfs-fails-at-spark