默认从hdfs中读,从文件中读应当
val df = spark.read.json(“file:///opt/module/spark-local/people.json”)
从hdfs中读还可以
val df = spark.read.json(“hdfs:///opt/module/spark-local/people.json”)
默认从hdfs中读,从文件中读应当
val df = spark.read.json(“file:///opt/module/spark-local/people.json”)
从hdfs中读还可以
val df = spark.read.json(“hdfs:///opt/module/spark-local/people.json”)