CLEANARCHIVE
Notes and Constraints
This section applies only to versions MRS 3.2.1-LTS through MRS 3.3.1-LTS.
Function
This command is used to clean up Hudi archive files. This process reduces storage consumption and minimizes performance pressure on Hudi tables.
Syntax
set hoodie.archive.file.cleaner.policy = KEEP_ARCHIVED_FILES_BY_SIZE;
set hoodie.archive.file.cleaner.size.retained = 5368709120;
run cleanarchive on tableIdentifier/tablelocation;
set hoodie.archive.file.cleaner.policy = KEEP_ARCHIVED_FILES_BY_DAYS;
set hoodie.archive.file.cleaner.days.retained = 30;
run cleanarchive on tableIdentifier/tablelocation;
Parameter Description
| Parameter | Description |
|---|---|
| tableIdentifier | Name of the Hudi table |
| tablelocation | Storage path of the Hudi table |
| hoodie.archive.file.cleaner.policy | Policy for clearing archived files: Currently, only the KEEP_ARCHIVED_FILES_BY_SIZE and KEEP_ARCHIVED_FILES_BY_DAYS policies are supported. The default policy is KEEP_ARCHIVED_FILES_BY_DAYS.
|
| hoodie.archive.file.cleaner.size.retained | When the policy is set to KEEP_ARCHIVED_FILES_BY_SIZE, this parameter specifies the total bytes of archived files to retain. The default value is 5368709120 bytes (5 GB). |
| hoodie.archive.file.cleaner.days.retained | When the policy is set to KEEP_ARCHIVED_FILES_BY_DAYS, this parameter specifies the number of days to retain archived files. The default value is 30 days. |
Precautions
Archived files are not backed up. Once deleted, these files cannot be restored.
Response
You can view command execution results in the driver log or on the client.
What is your overall rating for this page?
Thank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot