Failed to read from local file system in Linux spark



Hi team,

I am not able to read data from local file system in spark. I am using web console for practice.


val crime = sc.textFile("/public/crime/csv")




You are using the wrong path.
Correct path is /data/crime/csv not /public/crime/csv

Hope that helps!


Still same error


@hardik_patira If you are reading data from local launch spark-shell as local and try your query.

spark-shell --master local --conf spark.ui.port=12569


Got the solution. Its my bad.

Path should start file:///

Three forward slashes. i was using only two.