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]

Support Questions

Find answers, ask questions, and share your expertise
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!

Drop table is not working in hive.

avatar

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

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
New Member

@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

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