How to load a file from the local file system to Spark using sc.textFile? Do I need to change any -env variables? Also when I tried the same on my windows
Try changing
val inputFile = sc.textFile("file///C:/Users/swaapnika/Desktop/to do list")
to this:
val inputFile = sc.textFile("file:///Users/swaapnika/Desktop/to do list")
I'm also fairly new to hadoop and spark, but from what I gather, when running spark locally on Windows, the string file:/// when passed to sc.textFile already refers to C:\.