scala - How to access local files in Spark on Windows? -
i using spark on windows. know in *nix, accessing local file code likes this:
val textfile = sc.textfile("file:///usr/local/spark/readme.md") but how can access local file on windows? have tried following methods:
val logfile = "c:\spark-1.3.1-bin-hadoop2.4\readme.md" val logfile = "file\\c:\spark-1.3.1-bin-hadoop2.4\readme.md" but can't work.
unfortunately in windows have escape "\".
try:
"c:\\spark-1.3.1-bin-hadoop2.4\\readme.md"
Comments
Post a Comment