2016-04-29 6 views
1

私はHIVEにClustered Tableを持っています。presto + hive:CLUSTERED TABLE

すべてのクエリはハイブクライアントで動作します。 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. 
    The number of files in the directory (0) does not match the declared 
    bucket count (8) for partition: <UNPARTITIONED> 

しかし、プレストで、私はこのテーブルで任意のクエリを実行することはできません

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にあらかじめ設定してください。