Please the below-given configuration.
alluxio.master.tieredstore.global.level0.alias=MEM
alluxio.master.tieredstore.global.level1.alias=HDD
alluxio.master.tieredstore.global.levels=3
alluxio.worker.tieredstore.level0.watermark.high.ratio=0.9
alluxio.worker.tieredstore.level0.watermark.low.ratio=0.7
alluxio.worker.tieredstore.reserver.enabled=true
alluxio.worker.tieredstore.level0.dirs.path=/mnt/ramdisk
alluxio.worker.tieredstore.level0.alias=MEM
alluxio.worker.tieredstore.level1.alias=HDD
alluxio.worker.tieredstore.level1.watermark.high.ratio=0.9
alluxio.worker.tieredstore.level1.watermark.low.ratio=0.7
alluxio.worker.tieredstore.level1.dirs.path=/alluxiodata
alluxio.worker.tieredstore.levels=2
alluxio.master.ttl.checker.interval=60000
alluxio.worker.tieredstore.level1.dirs.quota=10GB
Once the alluxio comes up, I have executed the TTL command:
sudo ./bin/alluxio fs mkdir /samplePath
sudo ./bin/alluxio fs setTtl -action free /samplePath 600000
From a client application end, I have configured the below alluxio options through JAVAOpts:
-Dalluxio.user.file.write.tier.default=1 -Dalluxio.user.file.writetype.default=CACHE_THROUGH
Test case -
Upload a file to /samplePath path
Validate whether the file is cached or not
Wait for 1min (Since the ttl checker interval is 1min)
Validate whether file is cached or not
Expected - File should be uncached
Actual - File is still cached