I am a beginner in Spark and I am trying to create a DataFrame based on the content of JSON file using PySpark by following the guide: http://spark.apache.org/docs/1.6.1/sql-pro
I run into this problem too, add "file://" or "hdfs://" works for me! Thanks for Jessika's answer!!!
In conclusion, if your json file is in your local file system,use
df = sqlContext.read.json("file:///user/ABC/examples/src/main/resources/people.json")
else, if your json file is in hdfs, use
df = sqlContext.read.json("hdfs://ip:port/user/ABC/examples/src/main/resources/people.json")