我已經上傳一個csv文件已格式化的數據和我試圖使用
顯示器(問題)問題= spark.read.option(“頭”,“真正的”). csv (“/ FileStore /表/ Questions.csv”)
這是拋出錯誤如下:
SparkException:工作階段失敗而終止:任務0階段4.0失敗1次,最近的失敗:在舞台上失去了任務0.0 4.0 (TID 4, localhost,遺囑執行人司機):. lang。NullPointerException org.apache.spark.sql.execution.datasources.csv.UnivocityParser.org apache引發美元美元sql執行數據源csv UnivocityParser $ $美元美元轉換(UnivocityParser.scala: 196) org.apache.spark.sql.execution.datasources.csv.UnivocityParser.parse (UnivocityParser.scala: 193) org.apache.spark.sql.execution.datasources.csv.UnivocityParser anonfun 5.美元美元申請(UnivocityParser.scala: 320) org.apache.spark.sql.execution.datasources.csv.UnivocityParser anonfun 5.美元美元申請(UnivocityParser.scala: 320) org.apache.spark.sql.execution.datasources.FailureSafeParser.parse (FailureSafeParser.scala: 62) org.apache.spark.sql.execution.datasources.csv.UnivocityParser anonfun parseIterator美元2.美元(UnivocityParser.scala: 327)應用org.apache.spark.sql.execution.datasources.csv.UnivocityParser anonfun parseIterator美元2.美元(UnivocityParser.scala: 327)應用scala.collection.Iterator不久美元12.美元nextcur (Iterator.scala: 434) scala.collection.Iterator不久美元12.美元hasnext (Iterator.scala: 440) org.apache.spark.util.CompletionIterator.hasNext (CompletionIterator.scala: 32) scala.collection.Iterator立刻11.美元美元hasnext (Iterator.scala: 408) org.apache.spark.sql.execution.datasources.FileScanRDD不久美元1.美元hasnext (FileScanRDD.scala: 161) org.apache.spark.sql.catalyst.expressions.GeneratedClass GeneratedIterator美元。processNext(未知源)org.apache.spark.sql.execution.BufferedRowIterator.hasNext (BufferedRowIterator.java: 43) org.apache.spark.sql.execution.WholeStageCodegenExec anonfun 8美元立刻1.美元美元hasnext (WholeStageCodegenExec.scala: 423)美元org.apache.spark.sql.execution.collect.UnsafeRowBatchUtils .encodeUnsafeRows (UnsafeRowBatchUtils.scala: 49) org.apache.spark.sql.execution.collect.Collector anonfun 2.美元美元申請(Collector.scala: 126) org.apache.spark.sql.execution.collect.Collector anonfun 2.美元美元申請(Collector.scala: 125) org.apache.spark.scheduler.ResultTask.runTask (ResultTask.scala: 87) org.apache.spark.scheduler.Task.run (Task.scala: 110)美元org.apache.spark.executor.Executor TaskRunner.run (Executor.scala: 349) java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java: 1149)美元java.util.concurrent.ThreadPoolExecutor Worker.run (ThreadPoolExecutor.java: 624) java.lang.Thread.run (Thread.java: 748)
司機加: