presto + hive:CLUSTERED TABLE

时间:2016-04-29 08:54:01

标签: linux hadoop hive presto

我在HIVE中有分组表。

所有查询都在hive-client中运行。

但是在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>

需要帮助。

1 个答案:

答案 0 :(得分:1)

set hive.enforce.bucketing = true确保您插入的数据放在正确的存储桶中。似乎以前插入的数据会导致此损坏。
您应该将其删除并重新插入,事先将hive.enforce.bucketing设置为true