数组索引越界异常

Caused by: org.apache.spark.SparkException: Job aborted due to stage failure: Task 1 in stage 0.0 failed 1 times, most recent failure: Lost task 1.0 in stage 0.0 (TID 1) (192.168.133.2 executor driver): java.lang.ArrayIndexOutOfBoundsException: 1

检查代码没有问题,最后查看了读的数据,发现有空行,是这里出现了问题

数组索引越界异常_第1张图片

解决:将数据中的空行删除

你可能感兴趣的:(spark)