Reply
New Contributor
Posts: 3
Registered: ‎07-08-2015

Re: Hive error on Partitioned Parquet table

Hi,

We've upgraded to CDH 5.6.0 and we still have the same issue. I've tried both

ALTER TABLE <table> SET FILEFORMAT PARQUET;

and

ALTER TABLE <table> PARTITION (<partition>) SET FILEFORMAT PARQUET;

but none of this worked. Any ideas how can I resolve it?

 

Regards,

Boyan

Explorer
Posts: 7
Registered: ‎05-08-2015

Re: Hive error on Partitioned Parquet table

The below method worked for us.  This is from https://issues.cloudera.org/browse/IMPALA-2048 

 

If the table is MANAGED:

  • (Move table location) hadoop fs -mv /path/to/table /path/to/table.bak
  • (Get DDL) SHOW CREATE TABLE <table>;
  • DROP TABLE <table>;
  • CREATE TABLE <table> ...;
  • (Move partition data back) hadoop fs -mv /path/to/table.bak/* /path/to/table
  • (Recover partition metadata) MSCK REPAIR TABLE <table>;