Reply
Explorer
Posts: 10
Registered: ‎08-04-2017

Hive msck repair not working managed partition table

[ Edited ]

We have taken backup one of the production database data and moved it to development local filesystem.
In development movied data from local mountpoint to hive database hdfs location.

 

Question1: Hive msck repair in managed partition table failed with below error message.
hive> msck repair table testsb.xxx_bk1;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
What does exception means.

 

After dropping the table and re-create the table in external type. it worked successfully.
hive> use testsb;
OK
Time taken: 0.032 seconds
hive> msck repair table XXX_bk1;
xxx_bk1:payloc=YYYY/client_key=MISSDC/trxdate=20140109
.
.
Repair: Added partition to metastore xxx_bk1:payloc=0002/client_key=MISSDC/trxdate=20110105
.
.
Time taken: 16347.793 seconds, Fetched: 94156 row(s)

Can you please confirm why it not worked in managed table?

 

Question:2. Where else select * from table; query able to fetch in non-partition table. Why?
We have done testsb database creation and Table creation with ddl script.
And moved the data from local to hdfs hive table location.

Master
Posts: 402
Registered: ‎07-01-2015

Re: Hive msck repair not working managed partition table

The second question is not clear.
Highlighted
Explorer
Posts: 10
Registered: ‎08-04-2017

Re: Hive msck repair not working managed partition table

In non-partition table having multiple files in table location. When select statement triggered it worked.

 

How it fetch the data where else without running msck repair command?

Announcements