基于 TTL 的缓存驱逐
Last updated
$ bin/alluxio ttl add --path /s3/small_interval/ --time 5s
Warning: You are setting TTL policy to 5s. This TTL is too small. Note that expired cache are scanned and evicted every 1h. Please consider making this TTL larger with `bin/alluxio ttl update` command.
Added alluxioPath=/s3/small_interval/ and time=5s$ bin/alluxio ttl add --path /s3/data/ --time 10h
Added alluxioPath=/s3/data/ and time=10h
$ bin/alluxio ttl add --path /s3/data/team1 --time 5h
Added alluxioPath=/s3/data/team1 and time=5h
$ bin/alluxio ttl add --path /s3/data/team1/temporary --time 1h
Added alluxioPath=/s3/data/team1/temporary and time=1h$ bin/alluxio ttl update --path /s3/test_folder/ --time 30min
Updated alluxioPath=/s3/test_folder/ and time=30min
$ bin/alluxio ttl update --path /s3/test_folder/ --time 5s
Warning: You are setting TTL policy to 5s. This TTL is too small. Note that expired cache are scanned and evicted every 1h. Please consider making this TTL larger with `bin/alluxio ttl update` command.
Updated alluxioPath=/s3/test_folder/ and time=5s$ bin/alluxio ttl remove --path /s3/test_folder
Removed TTL policy for alluxioPath=/s3/test_folder/$ bin/alluxio ttl list
Listing all TTL policies
The ttl policy table is empty.
$ bin/alluxio ttl list
Listing all TTL policies
/s3/test.csv/ TTL: 1 hour
/s3/test_2.csv/ TTL: 30 seconds$ bin/alluxio ttl trigger
Force triggering all workers to scan their cache with TTL rules.
Successfully scheduled on-demand TTL evictions.
# If two workers are already in the middle of a regular scan
$ bin/alluxio ttl trigger
Force triggering all workers to scan their cache with TTL rules.
2 workers are already scanning
Successfully scheduled on-demand TTL evictions.alluxio.ttl.eviction.check.interval=24h