Вам нужно просто указать путь к файлу как "file: /// directory / file"
example:
val textFile = sc.textFile("file:///usr/local/spark/README.md")