mesos-go/examples/zkdetect/main.go 测试
2015-10-17 18:49
621 查看
zkdetect测试代码主要负责发现mesos master leader
1. standalone模式
1.1先启动本地mesos集群:
root@ubuntu:/home/tjy/mesos-0.24.0/build/bin# ./mesos-local.sh --ip=127.0.0.1 --port=5050
1.2然后执行测试代码:
root@ubuntu:/home/tjy/go-ws/src/github.com/mesos/mesos-go/examples/_output# ./zkdetect -masters 127.0.0.1:5050
-log_dir . -v 3
1.3执行结果如下:
root@ubuntu:/home/tjy/go-ws/src/github.com/mesos/mesos-go/examples/_output# cat
zkdetect.INFO
Log file created at: 2015/10/11 20:31:08
Running on machine: ubuntu
Binary: Built with gc go1.5.1 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I1011 20:31:08.444243 2978 main.go:38] creating ZK detector for "127.0.0.1:5050"
I1011 20:31:08.444859 2978 factory.go:93] New.defaultFactory
I1011 20:31:08.444896 2978 standalone.go:46] creating new standalone detector for &MasterInfo{Id:*master,Ip:*0,Port:*5050,Pid:*master@127.0.0.1:5050,Hostname:*127.0.0.1,Version:nil,Address:nil,XXX_unrecognized:[],}
I1011 20:31:08.444952 2978 main.go:45] created ZK detector
I1011 20:31:08.444966 2978 standalone.go:67] Detect()
I1011 20:31:08.444978 2978 standalone.go:69] spinning up asyc master detector poller
I1011 20:31:08.445478 2978 standalone.go:78] spawning asyc master detector listener
I1011 20:31:08.445620 2978 main.go:51] registered ZK listener
I1011 20:31:08.445638 2978 standalone.go:80] waiting for polled to send updates
I1011 20:31:08.445684 2978 standalone.go:140] polling for master leadership at '127.0.0.1:5050'
I1011 20:31:08.451280 2978 standalone.go:214] Got mesos state, content length 1675
I1011 20:31:08.451771 2978 standalone.go:147] detected leadership change from '<nil>' to 'master@127.0.0.1:5050'
I1011 20:31:08.451840 2978 standalone.go:185] master leader poller sleeping for 29.993862976s
I1011 20:31:08.451864 2978 standalone.go:88] detected master change: &MasterInfo{Id:*master,Ip:*0,Port:*5050,Pid:*master@127.0.0.1:5050,Hostname:*127.0.0.1,Version:nil,Address:nil,XXX_unrecognized:[],}
I1011 20:31:08.451970 2978 main.go:19] master changed: Id master Ip 0 Hostname 127.0.0.1 Port 5050 Version Pid master@127.0.0.1:5050
I1011 20:31:38.459248 2978 standalone.go:214] Got mesos state, content length 1675
I1011 20:31:38.461606 2978 standalone.go:161] no change to master leadership: 'master@127.0.0.1:5050'
I1011 20:31:38.461828 2978 standalone.go:185] master leader poller sleeping for 29.985301792s
2. High Availability模式
2.1 先启动HA模式的mesos集群
2.2 执行测试命令:./zkdetect
-masters zk://192.168.1.91:2181/mesos -log_dir . -v 3
1. standalone模式
1.1先启动本地mesos集群:
root@ubuntu:/home/tjy/mesos-0.24.0/build/bin# ./mesos-local.sh --ip=127.0.0.1 --port=5050
1.2然后执行测试代码:
root@ubuntu:/home/tjy/go-ws/src/github.com/mesos/mesos-go/examples/_output# ./zkdetect -masters 127.0.0.1:5050
-log_dir . -v 3
1.3执行结果如下:
root@ubuntu:/home/tjy/go-ws/src/github.com/mesos/mesos-go/examples/_output# cat
zkdetect.INFO
Log file created at: 2015/10/11 20:31:08
Running on machine: ubuntu
Binary: Built with gc go1.5.1 for linux/amd64
Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
I1011 20:31:08.444243 2978 main.go:38] creating ZK detector for "127.0.0.1:5050"
I1011 20:31:08.444859 2978 factory.go:93] New.defaultFactory
I1011 20:31:08.444896 2978 standalone.go:46] creating new standalone detector for &MasterInfo{Id:*master,Ip:*0,Port:*5050,Pid:*master@127.0.0.1:5050,Hostname:*127.0.0.1,Version:nil,Address:nil,XXX_unrecognized:[],}
I1011 20:31:08.444952 2978 main.go:45] created ZK detector
I1011 20:31:08.444966 2978 standalone.go:67] Detect()
I1011 20:31:08.444978 2978 standalone.go:69] spinning up asyc master detector poller
I1011 20:31:08.445478 2978 standalone.go:78] spawning asyc master detector listener
I1011 20:31:08.445620 2978 main.go:51] registered ZK listener
I1011 20:31:08.445638 2978 standalone.go:80] waiting for polled to send updates
I1011 20:31:08.445684 2978 standalone.go:140] polling for master leadership at '127.0.0.1:5050'
I1011 20:31:08.451280 2978 standalone.go:214] Got mesos state, content length 1675
I1011 20:31:08.451771 2978 standalone.go:147] detected leadership change from '<nil>' to 'master@127.0.0.1:5050'
I1011 20:31:08.451840 2978 standalone.go:185] master leader poller sleeping for 29.993862976s
I1011 20:31:08.451864 2978 standalone.go:88] detected master change: &MasterInfo{Id:*master,Ip:*0,Port:*5050,Pid:*master@127.0.0.1:5050,Hostname:*127.0.0.1,Version:nil,Address:nil,XXX_unrecognized:[],}
I1011 20:31:08.451970 2978 main.go:19] master changed: Id master Ip 0 Hostname 127.0.0.1 Port 5050 Version Pid master@127.0.0.1:5050
I1011 20:31:38.459248 2978 standalone.go:214] Got mesos state, content length 1675
I1011 20:31:38.461606 2978 standalone.go:161] no change to master leadership: 'master@127.0.0.1:5050'
I1011 20:31:38.461828 2978 standalone.go:185] master leader poller sleeping for 29.985301792s
2. High Availability模式
2.1 先启动HA模式的mesos集群
2.2 执行测试命令:./zkdetect
-masters zk://192.168.1.91:2181/mesos -log_dir . -v 3
相关文章推荐
- 开启ubuntu默认root的权限(su: Authentication failure)
- 关于调用gethostbyname失败的原因:Host name lookup failure.
- 在盒子里思考——11位人工智能科学家的探索与发现的笔记
- LeetCode OJ:Contains Duplicate III(是否包含重复)
- available()在不同的地方使用,结果不同
- 异常安全,RAII与C++11 http://www.cnblogs.com/mavaL/articles/2515381.html
- 【C++设计技巧】C++中的RAII机制 http://www.cnblogs.com/gnuhpc/archive/2012/12/04/2802307.html
- LeetCode OJ:Contains DuplicateII(是否包含重复II)
- LeetCode OJ:Contains Duplicate(是否包含重复)
- Code Forces 585 B. Phillip and Trains(BFS)
- 构造函数中抛出的异常 http://blog.csdn.net/deyili/article/details/6332760
- No Entertainment!
- apk安装故障INSTALL_FAILED_INSUFFICIENT_STORAGE
- hdoj 2389 Rain on your Parade 【HK】
- vim 集成环境搭建之vim-main
- Mybatis错误:Parameter 'XXX' not found. Available parameters are [1, 0, param1, param2]
- Mybatis错误:Parameter 'XXX' not found. Available parameters are [1, 0, param1, param2]
- C++中的RAII机制 http://www.jellythink.com/archives/101
- AIDL(1)
- RAII惯用法:C++资源管理的利器 http://www.cnblogs.com/hsinwang/articles/214663.html