You see if your operating environment is configured with HADOOP_HOME, or the yarn association is configured in the configuration file, if so, you should call file:/// in front of your path
Otherwise Spark will automatically change the path to the hdfs path