mesos-go/examples/zkdetect/main.go 测试
来源:互联网 发布:java判断数字奇偶 编辑:程序博客网 时间:2024/06/09 10:27
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
0 0
- mesos-go/examples/zkdetect/main.go 测试
- GO 测试
- Go!
- GO
- GO !
- go
- Go
- Go.
- go
- GO!
- go
- Go
- go
- 【GO】
- go
- go
- GO
- Go
- 测试管理
- ALM功能入门心得
- Github API 库的JSON文件格式
- CSS控制文本
- 在服务器上简单配置flask+uwsgi+nginx(只是可工作~嘿)
- mesos-go/examples/zkdetect/main.go 测试
- RCP菜单栏,工具栏实现的两种方法及RCP记事本例子
- Java语言中,Iterator和Iterable 区别联系
- LeetCode 4: Median of Two Sorted Arrays
- 扩展欧几里得 【记录】
- 1026. 程序运行时间(15)
- SharedPreferences
- BroadcastReceiver应用详解
- <LeetCode><Easy> 66 PlusOne