Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using Hive/ Enterprise-Class Enhancements of Hive/ Configuring Automatic Removal of Old Data in the Hive Directory to the Recycle Bin
Updated on 2024-10-25 GMT+08:00

Configuring Automatic Removal of Old Data in the Hive Directory to the Recycle Bin

After this function is enabled, run the following command to write a directory into Hive: insert overwrite directory "/path1" .... After the operation is successfully performed, the old data is removed to the recycle bin, and the directory cannot be an existing database path in the Hive metastore.

Procedure

  1. Log in to FusionInsight Manager. Click Cluster > Services > Hive, click Configurations > All Configurations.
  2. Choose HiveServer(Role) > Customization, add a customized parameter to the hive-site.xml parameter file, set Name to hive.overwrite.directory.move.trash, and set Value to true.
  3. Click Save to save the configuration. Click Instances, select all Hive instances, choose More > Restart Instance, enter the password of the current user, and click OK to restart all Hive instances.