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
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)