$ 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 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 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.
$ curl "http://localhost:30000/metrics/"
(snip)
# HELP alluxio_eviction_by_ttl_bytes_total Total number of bytes evicted from Alluxio workers by TTL policy.
# TYPE alluxio_eviction_by_ttl_bytes_total counter
alluxio_eviction_by_ttl_bytes_total{policy_path="s3://test-bucket/"} 4194304.0
(snip)