Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 02-16-2015 03:30 PM - edited 09-16-2022 02:21 AM
Hi there,
Frequently, I'm finding phantom tables (for example: cloudera_manager_metastore_canary_test_db_hive_hivemetastore_4fc2919535135f1bc562814ffdaad5f4_2015_02_11_16_56_30) in our Hive metastore. Some of this databases contain nothing which means I can drop the database, but more often than not they contain a table called "cm_test_table".
I have tried to delete this with the CASCADE parameter as obviously hive believes there's a table still in the database, but I get a weird error ([Error 10001]: Table not found cm_test_table) when clearly the table is found, so I imagine it may be a lock of some kind or a corrupt table.
In the past the only way I've been able to get rid of these phantom tables (it messes up some of our other systems - Presto for example with prestogres (https://github.com/facebook/presto/issues/2317)) is to rummage through the hive metastore and issue SQL commands one by one to remove the phantom tables and then databases but this seems highly inefficient.
Is there anything I'm missing which anyone can help with?
Many thanks in advance,
J