kudu cli 命令

kudu cli 命令

kudu 管理运维常用命令

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
service kudu-master restart
service kudu-tserver restart

# master server 管理界面
http://presto-1:8050/tablets

# tablet server 管理界面
http://presto-2:8051/tablet-servers

# 列出集群中的 tablet server
kudu tserver list presto-1,presto-2,presto-3

# 列出集群中的 master server
kudu master list presto-1,presto-2,presto-3

# 查看指定tserver_address的状态
kudu tserver status <tserver_address>

# 检测集群状态
sudo -u kudu kudu cluster ksck presto-1,presto-2,presto-3
sudo -u kudu kudu cluster ksck presto-1,presto-2,presto-3 > ./ksck.out 2>&1
<!-- more -->
# 检查tserver_address的状态
sudo -u kudu kudu remote_replica check <tserver_address>

# 列出所有表
kudu table list presto-1:7051,presto-2:7051,presto-3:7051

# 删除表
sudo -u kudu kudu table delete presto-1:7051,presto-2:7051,presto-3:7051 table_name
events
metrics_kudu
#
kudu remote_replica copy <tablet_id> <src_address> <dst_address> [-force_copy]

修复replicas

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
sudo -u kudu kudu cluster ksck master1,master2,master3 > ./ksck.out 2>&1
发现有56个表处于非健康状态:
==================
Errors:
==================
table consistency check error: 56 out of 183 table(s) are not healthy

举例:
在ksck.out中可以看到具体是哪个表的哪个tablet出问题了:
The consensus matrix is:
Config source | Replicas | Current term | Config index | Committed?
---------------+--------------+--------------+--------------+------------
master | A B C* | | | Yes
A | A B C* | 1427 | 2450 | Yes
B | A B C* | 1427 | 2450 | Yes
C | A B C* | 1427 | 2450 | Yes
Tablet 3689e076ed354f94a0967d1eed4b7d16 of table 'impala::dl_zz_kudu.tm_scada_hdzysj_change' is unavailable: 2 replica(s) not RUNNING
868688d5077b4e02b14a8a0a57958668: TS unavailable
0b4f24052ed74405b5d58fecd83f33e7: TS unavailable
a59cf0d8d1ed45d8b1af094f4a28d686 (xxxxx:7050): RUNNING [LEADER]

0 replicas' active configs differ from the master's.
All the peers reported by the master and tablet servers are:
A = 0b4f24052ed74405b5d58fecd83f33e7
B = 868688d5077b4e02b14a8a0a57958668
C = a59cf0d8d1ed45d8b1af094f4a28d686

可以看到只有a59cf0d8d1ed45d8b1af094f4a28d686这一个replication是好的,另外俩都不可用了。
修复命令:
sudo -u kudu kudu remote_replica unsafe_change_config xxxx:7050 3689e076ed354f94a0967d1eed4b7d16 a59cf0d8d1ed45d8b1af094f4a28d686

sudo -u kudu kudu remote_replica unsafe_change_config xxxx:7050 {tablet_id} {replica_id}

 
Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×