weed-fs 基础测试
===================
启动 master 端口:9333
===================
sunsl@test-server:~$ weed master
I0102 15:37:14 01273 sequence.go:47] Setting file id sequence 10000
I0102 15:37:14 01273 topology.go:57] Using default configurations.
I0102 15:37:14 01273 master.go:235] Volume Size Limit is 32768 MB
I0102 15:37:14 01273 master.go:249] Start Weed Master 0.45 at port 9333
I0102 15:43:41 01273 node.go:158] topo adds child DefaultDataCenter
I0102 15:43:41 01273 node.go:158] topo:DefaultDataCenter adds child DefaultRack
I0102 15:43:41 01273 node.go:158] topo:DefaultDataCenter:DefaultRack adds child 10.191.197.191:8080
I0102 15:44:39 01273 node.go:158] topo:DefaultDataCenter:DefaultRack adds child 10.191.197.191:8081
===================
启动Volume1 端口:8080
===================
sunsl@test-server:~$ weed volume -dir="/home/sunsl/data1" -max=5 -mserver="localhost:9333" -port=8080 -ip=10.191.197.191 &
[1] 1579
sunsl@test-server:~$ I0102 15:43:41 01579 volume.go:331] Volume Folder /home/sunsl/data1
I0102 15:43:41 01579 volume.go:332] Permission: -rwxrwxr-x
I0102 15:43:41 01579 store.go:178] Store started on dir: /home/sunsl/data1 with 0 volumes max 5
I0102 15:43:41 01579 volume.go:373] store joined at localhost:9333
I0102 15:43:41 01579 volume.go:375] Start Weed volume server 0.45 at http://10.191.197.191:8080
===================
启动Volume 端口:8081
===================
sunsl@test-server:~$ weed volume -dir="/home/sunsl/data2" -max=10 -mserver="localhost:9333" -port=8081 -ip="10.191.197.191" &
[1] 1720
sunsl@test-server:~$ I0102 15:44:39 01720 volume.go:331] Volume Folder /home/sunsl/data2
I0102 15:44:39 01720 volume.go:332] Permission: -rwxrwxr-x
I0102 15:44:39 01720 store.go:178] Store started on dir: /home/sunsl/data2 with 0 volumes max 10
I0102 15:44:39 01720 volume.go:373] store joined at localhost:9333
I0102 15:44:39 01720 volume.go:375] Start Weed volume server 0.45 at http://10.191.197.191:8081
===================
上传文件请求
===================
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/assign
{"count":1,"fid":"6,27103aeb43ba","publicUrl":"10.191.197.191:8080","url":"10.191.197.191:8080"}
master
I0102 15:48:25 01273 collection.go:23] collection adding replication type 000
I0102 15:48:25 01273 volume_growth.go:207] Created Volume 1 on topo:DefaultDataCenter:DefaultRack:10.191.197.191:8081
I0102 15:48:25 01273 volume_growth.go:207] Created Volume 2 on topo:DefaultDataCenter:DefaultRack:10.191.197.191:8081
I0102 15:48:25 01273 volume_growth.go:207] Created Volume 3 on topo:DefaultDataCenter:DefaultRack:10.191.197.191:8080
I0102 15:48:25 01273 volume_growth.go:207] Created Volume 4 on topo:DefaultDataCenter:DefaultRack:10.191.197.191:8081
I0102 15:48:25 01273 volume_growth.go:207] Created Volume 5 on topo:DefaultDataCenter:DefaultRack:10.191.197.191:8081
I0102 15:48:25 01273 volume_growth.go:207] Created Volume 6 on topo:DefaultDataCenter:DefaultRack:10.191.197.191:8080
I0102 15:48:25 01273 volume_growth.go:207] Created Volume 7 on topo:DefaultDataCenter:DefaultRack:10.191.197.191:8081
I0102 15:48:25 01273 sequence.go:81] Saving file id sequence 20000 to /tmp/weed.seq
80
sunsl@test-server:~$ I0102 15:48:25 01579 store.go:98] In dir /home/sunsl/data1 adds volume = 3 , collection = , replicationType = 000
I0102 15:48:25 01579 volume.go:105] loading file /home/sunsl/data1/3.idx readonly false
I0102 15:48:25 01579 store.go:98] In dir /home/sunsl/data1 adds volume = 6 , collection = , replicationType = 000
I0102 15:48:25 01579 volume.go:105] loading file /home/sunsl/data1/6.idx readonly false
sunsl@test-server:~/data1$ ll
total 16
drwxrwxr-x 2 sunsl sunsl 4096 Jan 2 15:48 ./
drwxr-xr-x 6 sunsl sunsl 4096 Jan 2 15:43 ../
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 3.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 3.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 6.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 6.idx
81
sunsl@test-server:~$ I0102 15:48:25 01720 store.go:98] In dir /home/sunsl/data2 adds volume = 1 , collection = , replicationType = 000
I0102 15:48:25 01720 volume.go:105] loading file /home/sunsl/data2/1.idx readonly false
I0102 15:48:25 01720 store.go:98] In dir /home/sunsl/data2 adds volume = 2 , collection = , replicationType = 000
I0102 15:48:25 01720 volume.go:105] loading file /home/sunsl/data2/2.idx readonly false
I0102 15:48:25 01720 store.go:98] In dir /home/sunsl/data2 adds volume = 4 , collection = , replicationType = 000
I0102 15:48:25 01720 volume.go:105] loading file /home/sunsl/data2/4.idx readonly false
I0102 15:48:25 01720 store.go:98] In dir /home/sunsl/data2 adds volume = 5 , collection = , replicationType = 000
I0102 15:48:25 01720 volume.go:105] loading file /home/sunsl/data2/5.idx readonly false
I0102 15:48:25 01720 store.go:98] In dir /home/sunsl/data2 adds volume = 7 , collection = , replicationType = 000
I0102 15:48:25 01720 volume.go:105] loading file /home/sunsl/data2/7.idx readonly false
sunsl@test-server:~/data2$ ll
total 28
drwxrwxr-x 2 sunsl sunsl 4096 Jan 2 15:48 ./
drwxr-xr-x 6 sunsl sunsl 4096 Jan 2 15:43 ../
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 1.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 1.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 2.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 2.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 4.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 4.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 5.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 5.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 7.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 7.idx
===================
上传文件
===================
sunsl@sunsl-nerc:~$ curl -F file=@"/home/sunsl/test.mp4" http://10.191.197.191:8080/6,27103aeb43ba
{"size":108021362}
80
sunsl@test-server:~/data1$ ll
total 105512
drwxrwxr-x 2 sunsl sunsl 4096 Jan 2 15:48 ./
drwxr-xr-x 6 sunsl sunsl 4096 Jan 2 15:43 ../
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 3.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 3.idx
-rw-r--r-- 1 sunsl sunsl 108021440 Jan 2 15:56 6.dat
-rw-r--r-- 1 sunsl sunsl 16 Jan 2 15:56 6.idx
81
sunsl@test-server:~/data2$ ll
total 28
drwxrwxr-x 2 sunsl sunsl 4096 Jan 2 15:48 ./
drwxr-xr-x 6 sunsl sunsl 4096 Jan 2 15:43 ../
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 1.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 1.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 2.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 2.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 4.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 4.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 5.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 5.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 7.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 7.idx
===================
查询Volume 信息
===================
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=1
{"locations":[{"publicUrl":"10.191.197.191:8081","url":"10.191.197.191:8081"}]}
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=2
{"locations":[{"publicUrl":"10.191.197.191:8081","url":"10.191.197.191:8081"}]}
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=3
{"locations":[{"publicUrl":"10.191.197.191:8080","url":"10.191.197.191:8080"}]}
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=4
{"locations":[{"publicUrl":"10.191.197.191:8081","url":"10.191.197.191:8081"}]}
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=5
{"locations":[{"publicUrl":"10.191.197.191:8081","url":"10.191.197.191:8081"}]}
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=6
{"locations":[{"publicUrl":"10.191.197.191:8080","url":"10.191.197.191:8080"}]}
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=7
{"locations":[{"publicUrl":"10.191.197.191:8081","url":"10.191.197.191:8081"}]}
sunsl@sunsl-nerc:~$ curl http://10.191.197.191:9333/dir/lookup?volumeId=8
{"error":"volume id 8 not found. "}
===================
下载文件
===================
原文件信息:
sunsl@sunsl-nerc:~$ ll test.mp4
-rw-r--r-- 1 sunsl sunsl 108021362 12月 25 09:11 test.mp4
sunsl@sunsl-nerc:~$ md5sum test.mp4
83884f03b00bbc769910df5c1f2ba866 test.mp4
------------------------------------
|sunsl@sunsl-nerc:~/Downloads/weedfile$ wget http://10.191.197.191:8080/6,27103aeb43ba
|--2014-01-02 16:10:57-- http://10.191.197.191:8080/6,27103aeb43ba
|Connecting to 10.191.197.191:8080... connected.
|HTTP request sent, awaiting response... 200 OK
|Length: 108021362 (103M) [application/octet-stream]
|Saving to: ‘6,27103aeb43ba’
|
|100%[================================================================================>] 108,021,362 417MB/s in 0.2s
|
|2014-01-02 16:10:58 (417 MB/s) - ‘6,27103aeb43ba’ saved [108021362/108021362]
|
|sunsl@sunsl-nerc:~/Downloads/weedfile$ ll
|total 105500
|drwxr-xr-x 2 sunsl sunsl 4096 1月 2 16:10 ./
|drwxr-xr-x 5 sunsl sunsl 4096 1月 2 16:08 ../
|-rw-r--r-- 1 sunsl sunsl 108021362 1月 2 15:56 6,27103aeb43ba
|sunsl@sunsl-nerc:~/Downloads/weedfile$ md5sum 6,27103aeb43ba
|83884f03b00bbc769910df5c1f2ba866 6,27103aeb43ba
|------------------------------------
|------------------------------------
|sunsl@sunsl-nerc:~/Downloads/weedfile$ wget http://10.191.197.191:8080/6,27103aeb43ba.mp4
|--2014-01-02 16:12:07-- http://10.191.197.191:8080/6,27103aeb43ba.mp4
|Connecting to 10.191.197.191:8080... connected.
|HTTP request sent, awaiting response... 200 OK
|Length: 108021362 (103M) [application/octet-stream]
|Saving to: ‘6,27103aeb43ba.mp4’
|
|100%[================================================================================>] 108,021,362 440MB/s in 0.2s
|
|2014-01-02 16:12:08 (440 MB/s) - ‘6,27103aeb43ba.mp4’ saved [108021362/108021362]
|
|sunsl@sunsl-nerc:~/Downloads/weedfile$ ll
|total 210992
|drwxr-xr-x 2 sunsl sunsl 4096 1月 2 16:12 ./
|drwxr-xr-x 5 sunsl sunsl 4096 1月 2 16:08 ../
|-rw-r--r-- 1 sunsl sunsl 108021362 1月 2 15:56 6,27103aeb43ba
|-rw-r--r-- 1 sunsl sunsl 108021362 1月 2 15:56 6,27103aeb43ba.mp4
|sunsl@sunsl-nerc:~/Downloads/weedfile$ md5sum 6,27103aeb43ba.mp4
|83884f03b00bbc769910df5c1f2ba866 6,27103aeb43ba.mp4
|------------------------------------
|------------------------------------
|sunsl@sunsl-nerc:~/Downloads/weedfile$ wget http://10.191.197.191:8080/6/27103aeb43ba/test.mp4
|--2014-01-02 16:13:50-- http://10.191.197.191:8080/6/27103aeb43ba/test.mp4
|Connecting to 10.191.197.191:8080... connected.
|HTTP request sent, awaiting response... 200 OK
|Length: 108021362 (103M) [application/octet-stream]
|Saving to: ‘test.mp4’
|
|100%[================================================================================>] 108,021,362 436MB/s in 0.2s
|
|2014-01-02 16:13:50 (436 MB/s) - ‘test.mp4’ saved [108021362/108021362]
|
|sunsl@sunsl-nerc:~/Downloads/weedfile$ ll
|total 316484
|drwxr-xr-x 2 sunsl sunsl 4096 1月 2 16:13 ./
|drwxr-xr-x 5 sunsl sunsl 4096 1月 2 16:08 ../
|-rw-r--r-- 1 sunsl sunsl 108021362 1月 2 15:56 6,27103aeb43ba
|-rw-r--r-- 1 sunsl sunsl 108021362 1月 2 15:56 6,27103aeb43ba.mp4
|-rw-r--r-- 1 sunsl sunsl 108021362 1月 2 15:56 test.mp4
|sunsl@sunsl-nerc:~/Downloads/weedfile$ md5sum test.mp4
|83884f03b00bbc769910df5c1f2ba866 test.mp4
|------------------------------------
===================
删除文件
===================
sunsl@sunsl-nerc:~/Downloads/weedfile$ curl -X DELETE http://10.191.197.191:8080/6,27103aeb43ba
{"size":108021426}
80
sunsl@test-server:~/data1$ ll
total 105512
drwxrwxr-x 2 sunsl sunsl 4096 Jan 2 15:48 ./
drwxr-xr-x 6 sunsl sunsl 4096 Jan 2 15:43 ../
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 3.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 3.idx
-rw-r--r-- 1 sunsl sunsl 108021464 Jan 2 16:18 6.dat //很奇怪这里为什么没有发生变化,待查
-rw-r--r-- 1 sunsl sunsl 32 Jan 2 16:18 6.idx
81
sunsl@test-server:~/data2$ ll
total 28
drwxrwxr-x 2 sunsl sunsl 4096 Jan 2 15:48 ./
drwxr-xr-x 6 sunsl sunsl 4096 Jan 2 15:43 ../
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 1.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 1.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 2.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 2.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 4.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 4.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 5.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 5.idx
-rw-r--r-- 1 sunsl sunsl 8 Jan 2 15:48 7.dat
-rw-r--r-- 1 sunsl sunsl 0 Jan 2 15:48 7.idx
测试再次删除时,显示信息:
sunsl@sunsl-nerc:~$ curl -X DELETE http://10.191.197.191:8080/6,27103aeb43ba
{"size":0}
====================
停止Volume1的服务
====================
sunsl@test-server:~$ ps aux |grep weed
sunsl 1273 0.0 0.4 200020 4948 pts/1 Sl+ 15:37 0:03 weed master
sunsl 1579 0.3 0.6 861744 6288 ? Sl 15:43 0:12 weed volume -dir=/home/sunsl/data1 -max=5 -mserver=localhost:9333 -port=8080 -ip=10.191.197.191
sunsl 1720 0.0 0.4 473632 5052 ? Sl 15:44 0:01 weed volume -dir=/home/sunsl/data2 -max=10 -mserver=localhost:9333 -port=8081 -ip=10.191.197.191
sunsl 2099 0.0 0.0 8144 620 pts/2 S+ 16:50 0:00 grep --color=auto weed
sunsl@test-server:~$ kill -9 1579
sunsl@test-server:~$ ps aux |grep weed
sunsl 1273 0.0 0.4 200020 4916 pts/1 Sl+ 15:37 0:03 weed master
sunsl 1720 0.0 0.4 473632 5052 ? Sl 15:44 0:01 weed volume -dir=/home/sunsl/data2 -max=10 -mserver=localhost:9333 -port=8081 -ip=10.191.197.191
主服务器响应信息:
I0102 16:51:25 01273 topology_event_handling.go:51] Removing Volume 3 from the dead volume server topo:DefaultDataCenter:DefaultRack:10.191.197.191:8080
I0102 16:51:25 01273 volume_layout.go:139] Volume 3 has 0 replica, less than required 1
I0102 16:51:25 01273 volume_layout.go:116] Volume 3 becomes unwritable
I0102 16:51:25 01273 topology_event_handling.go:51] Removing Volume 6 from the dead volume server topo:DefaultDataCenter:DefaultRack:10.191.197.191:8080
I0102 16:51:25 01273 volume_layout.go:139] Volume 6 has 0 replica, less than required 1
I0102 16:51:25 01273 node.go:170] topo:DefaultDataCenter:DefaultRack removes 10.191.197.191:8080 volumeCount = 5
I0102 16:51:25 01273 topology_event_handling.go:34] DataNode 10.191.197.191:8080 is dead!
weed-fs 基础测试的更多相关文章
- myBatis 基础测试 表关联关系配置 集合 测试
myBatis 基础测试 表关联关系配置 集合 测试 测试myelipse项目源码 sql 下载 http://download.csdn.net/detail/liangrui1988/599388 ...
- mysql基础测试
mysql基础测试 测试原因 为什么需要做性能测试 模拟比当前系统更高的负载,找出性能瓶颈 重现线上异常 测试不同硬件软件配置 规划未来的业务增长 测试分类 性能测试的分类 设备层的测试 ...
- 基础测试jmeter5.0+badboy(从小白到入门)
1]测试工具jmeter环境安装 1.1]安装jdk环境 1:必须安装jdk8.0(我尝试安装最新版本不行,好像当时没有配置好.之后安装8.0遍可以正常运行)下载地址:单击此段 配置jdk环境:鼠标右 ...
- 性能测试基础---测试流程,LR安装
·性能测试流程详解: 一般来说,性能测试通常可以分为以下过程: ·前期分析.测试计划.测试方案.测试环境的搭建.测试数据的准备.测试脚本的开发.测试场景的设计.测试场景的实现和执行.资源的监控.分析结 ...
- Kubeasz部署K8s基础测试环境简介
下面介绍使用Kubeasz部署K8s集群环境. https://github.com/easzlab/kubeasz在需要使用kubeeasz项目安装的k8s时,需要将所有需要它来部署的节点上,都安装 ...
- Linux基础测试--11道题
000.创建一个目录/data mkdir /data 001.在/data 下面创建一个文件oldboy.txt touch /data/oldboy.txt 002.为oldboy.txt 增加内 ...
- Hive基础测试操作
一.Hive测试 1.查看数据库 show databases; 2.使用某个数据库,如默认数据库 user default; 3.创建表 create table if not exist itst ...
- Python基础测试有关联的接口
test_guanlian.py放在case文件夹下 test_guanlian.pyimport unittest import requestsfrom urllib.parse import u ...
- 基于HDP3.0的基础测试
1,TestDFSIO write和read的性能测试, 测试hadoop读写的速度.该测试为Hadoop自带的测试工具,位于$HADOOP_HOME/share/hadoop/mapreduce目录 ...
随机推荐
- BZOJ 3670 && BZOJ 3620 && BZOJ 3942 KMP
最近感到KMP不会啊,以前都是背板的现在要理解了. #include <iostream> #include <cstring> #include <cstdio> ...
- 【Selenium2+Python】常用操作
Webdriver中比较常用的操作元素的方法: clear() 清除输入框的默认内容 send_keys("xxx") 在一个输入框里输入xx内容 ——如果输入中文,则 ...
- M3: 将页面元素制作为图片
本小节将介绍如何将页面元素保存为图片,在前一小节中,我们加入了名称为gridMsg的Grid Control,现在我们将使用RenderTargetBitmap把gridMsg这个页面元素保存为一张图 ...
- magento中如何实现产品图片放大效果
Magento列表页用jQuery实现产品图片放大效果今天看到个网站,鼠标移到列表页的产品图片上,旁边会弹出一个大图,感觉不错,就自己在Magento里写了个.先看看效果 这个效果比较好实现,打开li ...
- Interproscan, xml文件转化为tsv
将interproscan的结果转化格式 很奇怪 tsv格式里没有go, kegg, inter-domain信息,但是xml文件里面却有,tsv文件比较好处理,所以先将xml文件转化为tsv.用软件 ...
- 最短路径问题——dijkstra算法
仅谈谈个人对dijkstra的理解,dijkstra算法是基于邻接表实现的,用于处理单源最短路径问题(顺便再提一下,处理单源最短路径问题的还有bellman算法).开辟一个结构体,其变量为边的终点和边 ...
- C#多线程网摘 2
C#中,可以使用Thread类来处理(包含创建,启动,挂起,恢复,终止等操作)线程.本文将介绍如何使用Thread类来创建与启动新线程. Thread类类位于System.Threading命名空间中 ...
- i++; 与 ++i;的内部区别。
对于一个用前置自加和后置自加的效果相同的地方,我们应该用哪个呢? 例: for(point i = 0; i != N; ?): 上面for语句中的“?”处,你会在那里写i++还是++i呢? 前置++ ...
- Python学习笔记——Day1
突破从改变开始,一行行字符,熟悉的感觉,还是那个味儿...呀哈哈哈 一.变量 变量是计算机语言中能存储计算结果或能表示值的抽象概念,变量可以通过变量名访问.调用及修改.变量通常表示可变状态,即具有存储 ...
- shell问题(转)
一个同学问我一个问题,说有以下文件内容,要求输出为特定的格式.这里就献丑给出一个处理的方法吧,由于时间关系可能我的答案并不是最好的,但是我尽量将我的答案讲解明白,让你理解处理的方法.如果您有简单明了的 ...