Support Questions
Find answers, ask questions, and share your expertise

Hive error on Partitioned Parquet table

Explorer

Error while compiling statement: FAILED: SemanticException Class not found: com.cloudera.impala.hive.serde.ParquetInputFormat

 

Hive returns this error when querying one of the tables we have.  It is a partitiioned table stored as Parquet.  All other tables we have return fine with Hive.  I have searched and am not seeing this error in docs or through google searches.

 

Thank you.

11 REPLIES 11

New Contributor

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

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>;