...
There are cooldown and remote_cooldown in current implementation. Cooldown is used to migration partition from HDD to SSD while remote_cooldown is used to migration partition from local storage to S3.
Cooldown
storage_cooldown_time
Users can specify storage_cooldown_time for a table by either create table statement or alter table statement.
Code Block |
---|
CREATE TABLE example_db.table_name ( k1 BIGINT, k2 LARGEINT, v1 VARCHAR(2048) REPLACE, v2 SMALLINT SUM DEFAULT "10" ) UNIQUE KEY(k1, k2) DISTRIBUTED BY HASH (k1, k2) BUCKETS 32 PROPERTIES( "storage_medium" = "SSD", "storage_cooldown_time" = "2015-06-04 00:00:00" ); ALTER TABBLE example_db.table_name SET ("storage_cooldown_time" = "2015-06-04 00:00:00") |
Uses Users can also specify storage_cooldown_time for a partition via modify partition statement.
Code Block |
---|
ALTER TABLE example_db.table_name MODIFY PARTITION ("storage_cooldown_time" = "2015-06-04 00:00:00") |
storage_cooldown_seconds
Storage_cooldown_time works on absolute time, sometimes users want to set a ttl time range on a partition or time. So storage_cooldown_seconds and dynamic_partition.hot_partition_num come. storage_cooldown_seconds is a config in fe.conf, it is strange that it does not implemented as an attribute of a table or a partition.
Users can specify storage_cooldown_seconds in fe.conf, when the config is set, a partition in ssd is cooldown to hdd {storage_cooldown_seconds} seconds after the partition is created.
Decision
Action
Result
Scheduling
...