This repository has been archived by the owner on Aug 18, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 81
Zeppelin 命令行工具
Gao Dunqiao edited this page Nov 8, 2017
·
3 revisions
zeppelin的管理端命令行工具zp_manager,提供对集群的数据访问,建表,迁移,切主,状态查询等功能。 复杂功能如扩容,缩容,迁移,由基本命令setmaster, addslave, removeslave 组合完成
./zp_manager meta_ip meta_port
> CREATETABLE $table_name host_list_file
例:
> CREATETABLE test hostlist.example # 根据节点分布信息表hostlist.example创建名为test的Table
> pull $table_name
例:
> pull test
reset table:test
OK
current table info:
epoch:4
name: test
partition: 3
partition: 0 master: xxx.xxx.xxx.xxx : 6669
partition: 1 master: xxx.xxx.xxx.xxx : 6666
partition: 2 master: xxx.xxx.xxx.xxx : 6667
> listnode
例:
>listnode
xxx.xxx.xxx.xxx:6667 up
xxx.xxx.xxx.xxx:6666 up
xxx.xxx.xxx.xxx:6668 up
xxx.xxx.xxx.xxx:6669 up
OK
> listmeta
例:
>listmeta
master:xxx.xxx.xxx.xxx 15223
slave:
xxx.xxx.xxx.xxx:15221
xxx.xxx.xxx.xxx:15222
OK
> listtable
例:
>listtable
test
OK
> locate $table_name $key_name
例:
> locate test wk
partition_id: 0
master: xxx.xxx.xxx.xxx:6669
slave: xxx.xxx.xxx.xxx:6666
slave: xxx.xxx.xxx.xxx:6667
> setmaster $table_name $patition_num $ip $port
例:
> setmaster test 0 xxx.xxx.xxx.xxx 6669
OK
> addslave $table_num $parititon_num $ip $port
例:
> addslave test 0 xxx.xxx.xxx.xxx 6669
OK
> removeslave $table_num $parititon_num $ip $port
例:
> removeslave test 0 xxx.xxx.xxx.xxx 6669
OK
> space $table_num
例:
> space test
node: xxx.xxx.xxx.xxx 6667
used:255321586 bytes
remain:107791286272 bytes
> qps $table_num
例:
> space test
qps:0
total query:6093572
> offset $table_num $node_ip $node_port
例:
> offset test xxx.xxx.xxx.xxx 6667
partition:0
filenum:0
offset:77067506
partition:1
filenum:0
offset:77200811
partition:2
filenum:0
offset:77016777