2016-04-29 38 views
1

我有HIVE中的Clustered Table。presto + hive:CLUSTERED TABLE

所有查詢都可以在配置單元客戶端中使用。

但在急我不能運行與此表的任何查詢:

 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> 

需要幫助。

回答

0

set hive.enforce.bucketing = true確保您插入的數據放在正確的存儲桶中。這似乎是一個以前插入的數據導致此損壞。
您應該刪除它並再次插入,預先設置hive.enforce.bucketingtrue