Alluxio
ProductsLanguageHome
AI-3.4
AI-3.4
  • 概览
  • 部署Alluxio
    • 资源需求和兼容性
    • 在Kubernetes上安装Alluxio
    • 监控和指标
    • Alluxio 集群操作
    • 系统健康检查和快速恢复
    • 采集集群信息
  • 底层存储系统
    • 存储集成概述
    • Amazon AWS S3
    • HDFS
    • 阿里云 OSS
    • 腾讯 COS
    • 火山引擎 TOS
    • GCS
  • Client APIs
    • Alluxio Python Filesystem API based on FSSpec
    • 基于 FUSE 的 POSIX API
    • S3 API
  • 功能
    • Alluxio 命名空间和底层文件系统命名空间
    • 缓存预加载
    • Client 写回
    • 缓存驱逐
      • 基于 TTL 的缓存驱逐
      • 基于优先级的缓存驱逐
    • 缓存过滤
    • 缓存释放
    • 基于目录的集群配额
    • 文件多副本
    • 文件分片
    • 索引服务
    • I/O弹性
  • 性能基准测试
    • Fio 测试概览
    • MLPerf Storage 基准测试
    • 性能优化
    • COSBench 性能基准测试
  • 参考
    • 用户命令行接口
    • S3 API Usage
    • Third Party Licenses
  • 版本发布说明
Powered by GitBook
On this page
  • 缓存释放概述
  • 通过命令行释放缓存空间
  • 通过REST API释放缓存空间
  1. 功能

缓存释放

缓存释放概述

free操作提供了强制驱逐数据的选项,用来手动释放缓存空间。

通过命令行释放缓存空间

用法: bin/alluxio job free [flags]

  • 提交一个free任务:

$ {ALLUXIO_HOME}/bin/alluxio job free --path s3://bucket/path --submit
  • 查看一个free任务的进度:

$ {ALLUXIO_HOME}/bin/alluxio job free --path s3://alluxio/path --progress
Progress for Free path file 's3://alluxio/path':
  Job Id: b21ce9fb-f332-4d39-8bb4-554f9a4fa601
  Job Submitted: Fri Feb 02 21:28:56 CST 2024
  Job path: s3://alluxio/path
  Job State: SUCCEEDED, finished at Fri Feb 02 21:29:01 CST 2024
  Free Info : totalFile:4 totalByte:3072.00KB
  Free Files Failed: 0
  Free Bytes Failed: 0B
  Free Files Succeeded: 4
  Free Bytes Succeeded: 3072.00KB
  • 停止并中断一个正在运行的free任务:

    停止后,没有释放的文件依然会留在缓存中

$ {ALLUXIO_HOME}/bin/alluxio job free --path s3://alluxio/path --stop
参数描述:
--path [all] ufs路径
--batch-size [submit] 每秒每个worker释放文件的速度
--force [submit] 即使某些worker离线也触发释放
--verbose [progress] 输出free任务的详细信息
--format string [progress] 输出格式,TEXT或JSON(默认 "TEXT")

通过REST API释放缓存空间

  • 提交一个free任务:

curl -H "Content-Type: application/json" -v -X POST http://coordinator_host:19999/api/v1/master/submit_job/free -d '{
	"path": "s3://alluxio/path",
	"options": {
	"batchSize": "200"
	}
}'
  • 查看一个free任务的进度:

curl -H "Content-Type: application/json" -v -X GET http://coordinator_host:19999/api/v1/master/progress_job/free -d '{
	"path": "s3://alluxio/path",
	"format": "JSON",
	"verbose": "true"
}'
  • 停止并中断一个正在运行的free任务:

    停止后,没有释放的文件依然会留在缓存中

curl -H "Content-Type: application/json" -v -X POST http://coordinator_host:19999/api/v1/master/stop_job/free -d '{
	"path": "s3://alluxio/path"
}'
  • 查询free任务列表:

curl http://ip:1999/api/v1/master/list_job?job-type=FREE[&job-state=[RUNNING|VERIFYING|STOPPED|SUCCEEDED|FAILED|ALL]]

Last updated 3 months ago