Support Questions

Find answers, ask questions, and share your expertise

Drop table is not working in hive.

avatar
New Contributor

Hello all, I'm a little new in Haddop world, so, please forgive me any kind of questions that I'm doing.

In first place, I installed a 7 node cluster in my environment, all of them has DataNode (I know now that's the worst scenario, but, it's already installed and no time to fix it).

In this morning, a simple process that need to drop a partitioned table in Hive isn't working anymore, there was no modification on cluster.

The simple command is "drop table ods.tims_declaracao;".

Well, I think that I got the problem worse, I removed the directory "/apps/hive/warehouse/ods.db/tims_declaracao". I thought that I would drop the table, well, I realize that it was not.

The table still hanging in drop the metadata. Can some good soul help me to find out what's the problem?


Regards.

1 ACCEPTED SOLUTION

avatar
New Contributor

Thank you for the answer, I found how to fix the problem, I cannot drop the table because there are a table in MySQL that defines what's locked or not.

The table is "HIVE_LOCKS", from hive database, I just deleted the data correlated to my table and I was able to drop it.


Thanks

View solution in original post

2 REPLIES 2

avatar
Contributor

@Rodrigo Gallacci

Can you please provide information regarding which HDP and hive version you are using?

Its seems like a managed table, are you getting any error logs?

if its hdp3.1 can you usine beeline in debug more like below

beeline --verbose=true

and post the logs ?

avatar
New Contributor

Thank you for the answer, I found how to fix the problem, I cannot drop the table because there are a table in MySQL that defines what's locked or not.

The table is "HIVE_LOCKS", from hive database, I just deleted the data correlated to my table and I was able to drop it.


Thanks