+6 votes
1 view
in Big Data Hadoop & Spark by (11.5k points)

I just set up  hadoop cluster. Also, I have got hive terminal running on it.

Now, out of all my databases I have altered one of them but now I want to delete it because I don't find it useful anymore. But the problem is arising here, it is not getting deleted. I have used DROP command but it is of no use as the database is still there. I’ve been stuck here for a long time now.

So, I am looking for an alternate method to delete my database.

1 Answer

0 votes
by (25.6k points)
edited by

Working with HDFS here? I have tried this at my end and this worked perfectly for me.

  • To delete the desired database without using Hive terminal, you have to go to the hive database location in hdfs, you will find your database in warehouse directory.

  •  My directory is /usr/hive/warehouse/userme.db

Now, open another terminal for flexibility. 

  • To remove this particular database(for me- userme.db) copy the directory given above and paste on the terminal after typing remove command.

$ hdfs dfs -rm -r /usr/hive/warehouse/userme.db

Now your database is deleted without using Hive terminal.

For more information regarding the same, refer the following link:

...