Skip to content

Commit 797c034

Browse files
author
Xiaolu Zhang
committedDec 5, 2014
moved to new project
0 parents  commit 797c034

File tree

1,047 files changed

+199779
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,047 files changed

+199779
-0
lines changed
 

‎README.md

+115
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# storm-cli
2+
3+
storm-cli是storm的一个命令行工具,可以通过命令行查看storm中各个supervisor,topology,spout以及bolt的运行状态.
4+
5+
## 安装依赖
6+
7+
storm-cli依赖于thrift-storm,它是thrift-0.7.0的storm定制版,不使用此thrift版本生成的代码是错误的.
8+
9+
使用其它版本的thrift虽然不能生成正确的代码,但是可以使用已生成的代码通信,所以可能不影响使用,这点还需验证.
10+
11+
解包
12+
13+
$ unzip thrift-storm.zip
14+
$ cd thrift-storm
15+
16+
打补丁
17+
18+
$ patch -p0 < ../thrift-1382.patch
19+
20+
编译安装
21+
22+
$ ./bootstrap.sh
23+
$ ./configure --without-ruby
24+
$ make
25+
$ make install
26+
$ cd lib/py
27+
$ python setup.py install
28+
29+
## 快速入门
30+
31+
本命令行工具带自动补全功能,可以使用tab键快速补全命令,拓扑名,component名等.
32+
33+
### 运行
34+
35+
$ ./storm-cli Host[:Port] [cmd [arg [arg ...]]]
36+
37+
### 查看列表: ls
38+
39+
10.77.96.30:/>ls
40+
10.77.96.30:/>ls news_count/
41+
10.77.96.30:/news_count>ls
42+
43+
### 查看状态信息: top
44+
45+
10.77.96.30:/>top
46+
10.77.96.30:/>top news_count/
47+
10.77.96.30:/news_count>top
48+
49+
此命令会实时获取storm的信息.
50+
51+
Topology Summary
52+
Name Status Uptime Num workers Num executors Num tasks
53+
oid_count ACTIVE 1d 5h 19m 54s 24 1978 1978
54+
55+
56+
Spouts
57+
Id Executors Tasks Emitted(10min) Emitted(All)
58+
KafkaSpout 13 13 25471540 4161909860
59+
60+
Bolts
61+
Id Executors Tasks Emitted(10min) Emitted(All) Capacity(Max) Capacity(Avg) Execute latency(10min) Executed(1s) Executed(10min) Executed(All)
62+
redisDumper 10 10 0 0 0.136 0.128 0.134 9573 5743800 969995580
63+
ProgramFilterBolt 150 150 21352480 2936184400 0.108 0.091 0.321 42463 25477880 4161905620
64+
OidsCountBolt 10 10 69593260 10980638420 0.136 0.115 0.090 12699 7619660 1200681500
65+
TrendDumper 1500 1500 0 0 0.854 0.370 49.054 11311 6786960 1066229800
66+
TopicFilterBolt 150 150 7611780 1200571560 0.126 0.111 0.390 42466 25480180 4161907820
67+
__acker 1 1 0 0 0.000 0.000 0.000 0 20 3480
68+
CopyBolt 20 20 25470620 4161896760 0.040 0.034 0.016 42451 25470660 4161896920
69+
OidsSumBolt 10 10 5739420 969993260 0.068 0.058 0.005 115835 69501320 10980571080
70+
UqualityFilterBolt 4 4 6792700 1066235840 0.106 0.095 0.030 12696 7617940 1200577100
71+
HdfsDumper 10 10 0 0 0.323 0.139 0.039 35628 21377200 2936228360
72+
RedisHllDumper 100 100 0 0 0.220 0.202 1.595 12686 7612000 1200571840
73+
74+
如上显示的是一个topology的top输出,定时刷新,使用ctrl c退出.
75+
76+
### 进入命令: cd
77+
78+
10.77.96.30:/>cd news_count/
79+
10.77.96.30:/>cd news_count/commentFirehoseSpout/
80+
10.77.96.30:/news_count/commentFirehoseSpout>cd ../../mblog_count/
81+
82+
### 刷新命令: refresh
83+
84+
10.77.96.30:/>refresh
85+
86+
使用这个命令可以刷新storm的信息,例如submit或者kill一个topology后使用次命令才在自动补全以及ls的时候正常显示.
87+
88+
### Deactivate命令: deactivate
89+
90+
10.77.96.30:/>deactivate test_topology/
91+
Confirm your operation(y/n): y
92+
Deactivate test_topology success.
93+
94+
95+
### Activate命令: activate
96+
97+
10.77.96.30:/>activate test_topology/
98+
Activate test_topology success.
99+
100+
### Rebalance命令: rebalance
101+
102+
10.77.96.30:/>rebalance test_topology/
103+
Specify wait seconds before rebalance test_topology: 30
104+
Rebalance test_topology success.
105+
106+
### Kill命令: kill
107+
108+
10.77.96.30:/>kill test_topology/
109+
Confirm your operation(y/n): y
110+
Specify wait seconds before kill test_topology: 30
111+
Kill test_topology success.
112+
113+
### 退出命令: exit
114+
115+
10.77.96.30:/>exit

‎gen-py/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)
Please sign in to comment.