I am trying to read files from HDFS. I am using the following code:
val sam = sc.wholeTextFiles("hdfs://localhost:9000"+inputFolder,4)
java.lang.IllegalArgumentException: Wrong FS: hdfs://localhost, expected: hdfs://localhost:9000
Can you check adding winutils.exe in your system and setting a environment variable for the same . Spark needs winutils.exe to do hdfs operations.