Help Center/
MapReduce Service/
User Guide (Kuala Lumpur Region)/
FAQs/
Big Data Service Development/
How Do I Set the TTL for an HBase Table?
Updated on 2022-08-12 GMT+08:00
How Do I Set the TTL for an HBase Table?
- Set the time to live (TTL) when creating a table:
Create the t_task_log table, set the column family to f, and set the TTL to 86400 seconds.
create 't_task_log',{NAME => 'f', TTL=>'86400'}
- Set the TTL for an existing table:
disable "t_task_log" #Disable the table (services must be stopped). alter "t_task_log",NAME=>'data',TTL=>'86400' # Set the TTL value for the column family data. enable "t_task_log" #Restore the table.
Parent topic: Big Data Service Development
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
The system is busy. Please try again later.
For any further questions, feel free to contact us through the chatbot.
Chatbot