-2
我正在尝试使用spark从本地路径读取文本文件。但它抛出了一个例外。 Error image从本地机器读取文本文件
我用来读取文件的代码是这样的:
val assetFile = sc.textFile(assetFilePath)
assestFilePath是一个变量whichrepresent的路径,在我的本地机器somehere。
val adFile = sc.textFile(adFilePath)
adFilePath是一个变量,它表示在本地机器上的某个路径。
我强烈建议您发布错误堆栈并删除图像的链接。 – dbustosp
你检查了这个链接:[http://stackoverflow.com/questions/27299923/how-to-load-local-file-in-sc-textfile-instead-of-hdfs](http://stackoverflow.com /问题/ 27299923 /如何对负载本地文件中-SC-文本文件,INSTEAD-OF-HDFS) – dbustosp