The reason is that there are two spark header
[File: //] represents the local
[Hdfs: //] represents the path hdfs
If the path is not a file header, spark the path will be added by default on "hdfs: //"
So if you want to access local csv file, you need to make sure there is a path in front of "file: //"
// java code that tells spark which is a local file
"file: ///" + url