Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Who Agreed with this topic

HDFS Cloudera hive metastore phantom tables

New Contributor

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,

Who Agreed with this topic