Hive无法读取Parquet

查询Hive表,报错:Failed with exception java.io.IOException:parquet.io.ParquetDecodingException: Can not read value at 0 in block -1 in file hdfs://xxx:8020/user/hive/warehouse/tmp.db/table1/part-00000.snappy.parquet

解决办法:

构建SparkSession时,增加 spark.sql.parquet.writeLegacyFormat

SparkSession.builder()
.config("spark.sql.parquet.writeLegacyFormat", true)
.enableHiveSupport()
.getOrCreate()

 

你可能感兴趣的:(Spark,Can,not,read,value,at,0,in,blo,parquet,spark)