presto+hive:集群表

6ss1mwsb  于 2021-05-29  发布在  Hadoop
关注(0)|答案(1)|浏览(504)

我在 hive 里有一张table。
所有查询都在配置单元客户端中工作。
但在presto中,我无法使用此表运行任何查询:

Query ... failed: Hive table is corrupt. 
     It is declared as being bucketed, but the files do not match the 
     bucketing declaration. 
     The number of files in the directory (0) does not match the declared 
     bucket count (8) for partition: <UNPARTITIONED>

之后 set hive.enforce.bucketing = true; 错误:

Query ... failed: Hive table is corrupt. 
It is declared as being bucketed, but the files do not match the bucketing declaration. 
Found sub-directory in bucket directory for partition: <UNPARTITIONED>

我需要帮助。

pb3s4cty

pb3s4cty1#

set hive.enforce.bucketing = true 确保插入的数据放在正确的存储桶中。似乎是以前插入的数据导致了这种损坏。
您应该删除它并重新插入,设置 hive.enforce.bucketingtrue 事先。

相关问题