When I am using DROP TABLE IF EXISTS <Table Name>
in hive, it is not freeing the memory. The files are created as 0000_n.bz2
and they are still on disk.
I have two questions here:
1) Will these files keep on growing for each and every insert? 2) Is there any DROP equivalent to remove the files as well on the disk?
Couple of things you can do:
Check if the table is an external table and in that case you need to drop the files manually on HDFS as dropping tables won't drop the files: hadoop fs -rm /HDFS_location/filename
Secondly check if you are in the right database. You need to issue use database command before dropping the tables. The database should be same as the one in which tables were created.