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

Popular posts from this blog

unity3d - Rotate an object to face an opposite direction -

angular - Is it possible to get native element for formControl? -

javascript - Why jQuery Select box change event is now working? -