Help Center/ MapReduce Service/ Component Operation Guide (LTS)/ Using Spark/Spark2x/ Common Issues About Spark/ What Should I Do If Recycle Bin Version I Set on the Spark Client Does Not Take Effect?
Updated on 2024-10-25 GMT+08:00

What Should I Do If Recycle Bin Version I Set on the Spark Client Does Not Take Effect?

Question

The setting of fs.obs.hdfs.trash.version=1 on the Spark client did not take effect. After table was dropped, the path for storing files in the recycle bin remained unchanged.

Generally, the default settings are as follows:

  • If fs.obs.hdfs.trash.version is set to 2, the recycle bin path is /user/.Trash/${userName}/Current.
  • If fs.obs.hdfs.trash.version is set to 1, the recycle bin path is /user/${userName}/.Trash/Current.

Answer

Log in to Manager and choose Cluster > Services > Hive, click Configurations, click All Configurations, and select MetaStore (Role) > Customization. On the displayed page, set hive.metastore.customized.configs. Set fs.obs.hdfs.trash.version to 1, save the settings, and restart the Metastore instance.

After Hive Metastore is configured, the recycle bin path is correct.