Failed with exception java.io.IOException:org.apache.parquet.io.ParquetDecodingException

Failed with exception java.io.IOException:org.apache.parquet.io.ParquetDecodingException: Can not read value at 0 in block -1 in file hdfs://hadoop102:8020/warehouse/gmall/ads_user_action4/dt=2020-06-14/part-00000-52558b00-e39f-453c-8d9a-a924776a0aa7.c000.snappy.parquet

记录一次spark on hive,写数据到hive表后,使用hive查询报错的问题。

网上查了好多都没有查到具体原因,最后在spark官网找到了问题所在,有一个参数:spark.sql.parquet.writeLegacyFormat,默认为false。
先看官网解释:
If true, data will be written in a way of Spark 1.4 and earlier. For example, decimal values will be written in Apache Parquet’s fixed-length byte array format, which other systems such as Apache Hive and Apache Impala use. If false, the newer format

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值