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

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

点赞