How Do I Release Disk Space After Dropping a Table in Hive?
Issue
After a user runs the drop command on the Hive CLI to drop a table and then uses the hdfs dfsadmin -report command to check the disk space, the command output shows that the table is not deleted.
Cause Analysis
The drop command executed on the Hive CLI deletes only the table structure of the external table, but not the table data stored in HDFS.
Procedure
- Log in to the node where the client is installed as user root and authenticate the component user.
cd Client installation directory
source bigdata_env
kinit Component service user (Skip this step for clusters with Kerberos authentication disabled.)
- Run the following command to delete the table stored in HDFS:
hadoop fs -rm hdfs://hacluster/Path of the table
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.