是否可以让 spark 将本地文件作为输入,但对其进行处理?
我sc.textFile(file:///path-to-file-locally)
的代码中有,而且我知道文件的确切路径是正确的。然而,我仍然得到
Py4JJavaError: An error occurred while calling z:org.apache.spark.api.python.PythonRDD.collectAndServe.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0 in stage 1.0 failed 4 times, most recent failure: Lost task 0.3 in stage 1.0 (TID 14, spark-slave11.ydcloud.net): java.io.FileNotFoundException: File file:/<path to file> does not exist
我正在运行 spark 分布式,而不是在本地运行。为什么存在错误?