spark.read
.format("org.apache.spark.sql.execution.datasources.csv.CSVFileFormat")
.format("csv")
.option("header", "true") // Use first line of all files as header
.option("inferSchema", "false") // Automatically infer data types
.option("delimiter", ",")
.load(csvPath)
报错内容:

Multiple sources found for csv (org.apache.spark.sql.execution.datasources.csv.CSVFileFormat, com.databricks.spark.csv.DefaultSource15), please specify the fully qualified class name
解决方法:Spark 2.0后需要加入csv的完全路径:
spark
.read
.format("org.apache.spark.sql.execution.datasources.csv.CSVFileFormat")
.option("header","true")
.schema(schema)
.load(csvPath)