Member since
04-10-2015
3
Posts
0
Kudos Received
1
Solution
My Accepted Solutions
Title | Views | Posted |
---|---|---|
9762 | 06-03-2015 07:07 AM |
06-03-2015
07:07 AM
Yes, I was able to fix this by using gilad's script to manually drop the hive table by doing DML against the underlying metastore database. Do note that I found a few issues with a couple of the SQL statements (as I documented above), so be sure to backup your metastore database first if you attempt this. Good luck! Cheers, dave
... View more
04-10-2015
11:50 AM
Great script. But I wanted to point out that some of your SQL for mySQL looks like it might be missing some where clauses. For instance, this query is missing a join between C and 😧 delete from CDS where CD_ID in
(
select CD_ID from
(
select distinct(c.CD_ID) from DBS d, CDS c
where d.NAME like 'cloudera_manager_metastore_canary_test%' and c.CD_ID not in (select TBL_ID from TBLS)
) as sub_query
); Also, these other queries look suspect for being cartesian joins: delete from SERDES where SERDE_ID in
(
select SERDE_ID from
(
select sd.SERDE_ID from DBS d, CDS c, SERDES sd
where d.NAME like 'cloudera_manager_metastore_canary_test%' and d.DB_ID = c.CD_ID and sd.NAME like 'CM_TEST_TABLE%'
) as sub_query
); delete from SDS where SD_ID in
(
select SD_ID from
(
select s.SD_ID from DBS d, SERDES sd, SDS s, TBLS t where d.NAME like 'cloudera_manager_metastore_canary_test%'
and s.SERDE_ID = sd.SERDE_ID and sd.NAME like 'CM_TEST_TABLE%'
) as sub_query
);
... View more