热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Seaweedfs基本操作命令

客户端服务:(只能针对master,不能针对volume)1)获取一个自动分配的id,唯一的文件标示(如果开始没有vol

客户端服务:

(只能针对master,不能针对volume)

1)获取一个自动分配的id,唯一的文件标示(如果开始没有volumeid,则第一次执行会创建)

curl http://localhost:9333/dir/assign

2)查看卷id为4所在的地址(针对存在多个volume)

curl http://localhost:9333/dir/lookup?volumeId=3

3)将myphoto.jpg上传到服务器

curl -F file=@/home/chris/myphoto.jpg http://127.0.0.1:8080/3,01637037d6

4)将myphoto.jpg进行存储

curl -F file=@/home/chris/myphoto.jpg http://localhost:9333/submit

5)创建volume数据块

curl -F file=@hello.txt "http://localhost:9333/submit?collection=picture."curl http://master:9333/dir/assign?collection=pictures

(可以针对volume)

1)删除fid为“3,01637037d6”的数据

curl -X DELETE http://127.0.0.1:8080/3,01637037d6

2)集合删除

curl "http://localhost:8080/admin/delete_collection?collection=some_collection_name."

3)删除某个volumeid

curl "http://localhost:8080/admin/volume/delete?volume=volumeId"

4)挂载volumeId

curl "http://localhost:8080/admin/volume/unmount?volume=volumeId"

5)卸载volumeId

curl "http://localhost:8080/admin/volume/mount?volume=volumeId"

6)查看8080对应volume服务的状态

curl "http://localhost:8080/status?pretty=y"

7)指定数据中心

http://localhost:9333/dir/assign?dataCenter=dc1

8)设置超时时间

curl http://localhost:9333/dir/assign?ttl=3mcurl -F "file=@x.go" http://127.0.0.1:8080/5,01637037d6?ttl=3m

时间单位:

'm', 'h', 'd', 'w', 'M', 'y'.


推荐阅读
author-avatar
dwxa520恋歌_261
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有