Alluxio
ProductsLanguageHome
AI-3.5 (stable)
AI-3.5 (stable)
  • 概览
  • 部署Alluxio
    • 资源需求和兼容性
    • 在Kubernetes上安装Alluxio
    • 监控和指标
    • Alluxio 集群操作
    • 系统健康检查和快速恢复
    • 采集集群信息
  • 架构
    • Alluxio 命名空间和底层文件系统命名空间
    • I/O弹性
    • worker管理与一致性哈希
  • 底层存储系统
    • Amazon AWS S3
    • HDFS
    • 阿里云 OSS
    • 腾讯 COS
    • 火山引擎 TOS
    • 谷歌云 GCS
  • Client APIs
    • 基于 FSSpec 的Alluxio Python Filesystem API
    • 基于 FUSE 的 POSIX API
      • Client 写回
    • S3 API
  • 缓存操作
    • 缓存预加载
    • 缓存过滤
    • 缓存驱逐
      • TTL (有效时间)规则
      • 优先级规则
      • 通过命令行释放缓存空间
  • 资源管理
    • 基于目录的集群配额
    • UFS 带宽限制
  • 性能优化
    • 通过副本提高读取吞吐量
    • 读取大文件
    • 元数据列表
    • 数据预拉取
    • 写入临时文件
  • 安全
    • TLS 支持
  • 性能基准测试
    • Fio 测试概览
    • MLPerf Storage 基准测试
    • COSBench 性能基准测试
  • 参考
    • 用户命令行接口
    • 指标
    • S3 API 的使用
    • 第三方授权
  • 版本发布说明
Powered by GitBook
On this page
  • 缓存释放概述
  • 通过命令行释放缓存空间
  • 通过REST API释放缓存空间
  1. 缓存操作
  2. 缓存驱逐

通过命令行释放缓存空间

缓存释放概述

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

通过命令行释放缓存空间

用法: bin/alluxio job free [flags]

  • 操作一个free任务:

$ {ALLUXIO_HOME}/bin/alluxio job free --path s3://bucket/path --[submit|progress|stop]

$ {ALLUXIO_HOME}/bin/alluxio job free --local-index-file /indexfile --[submit|progress|stop]

$ {ALLUXIO_HOME}/bin/alluxio job free --ufs-index-file s3://bucket/indexfile --[submit|progress|stop]
  • 查看一个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")
--ufs-index-file [All] 释放操作的ufs路径
--local-index-file [All] 释放操作的本地路径
--replicas [submit]释放文件副本数量,仅在index file中有效

通过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任务列表,结果仅包含七天内的free任务, 历史任务驻留时间可以通过alluxio.job.retention.time配置:

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

Last updated 3 months ago