我们正在使用apache spark,我们将json文件保存为hdfs中的gzip压缩的镶木地板文件 . 但是,当读回它们以生成数据帧时,某些文件(但不是全部)会引发以下异常:
ERROR Executor: Exception in task 2.0 in stage 72.0 (TID 88)
org.apache.parquet.io.ParquetDecodingException: Can not read value at 351 in
block 0 in file file:/path/to/file [...]
Caused by: java.lang.ClassCastException:
org.apache.spark.sql.catalyst.expressions.MutableLong cannot be cast to
org.apache.spark.sql.catalyst.expressions.MutableDouble
任何帮助深表感谢!
1 回答
当您尝试同时读取具有不同架构的镶木地板文件时,将发生此类错误 . 尝试拥有/转换所有源文件具有相同的架构或同时转换所有源文件 .