问题
I have the following error:
java.io.IOException: No input paths specified in job
When I execute the following line:
val df = sqlContext.read.json("file://home/test.json")
Any ideas?
回答1:
If you want to load data from local please use
sqlContext.read.json("file:///home/shankar/test.json")
or just
sqlContext.read.json("/home/shankar/test.json")
will work
If you want to load the file from HDFS use
sqlContext.read.json("hdfs:///user/shankar/test.json")
Hope this helps!
来源:https://stackoverflow.com/questions/43800187/spark-java-io-ioexception-no-input-paths-specified-in-job