kudu tablet leader_step_down
功能:强制使
kudu tablet leader_step_down 10.110.18.102:7051,10.110.18.184:7051,10.110.18.185:7051 08c7def983394ff3ac64b5292dfb5dea
kudu tablet change_config add_replica
功能:为
kudu tablet change_config add_replica 10.110.18.102:7051,10.110.18.184:7051,10.110.18.185:7051 08c7def983394ff3ac64b5292dfb5dea 1618d3a544e4463286ae91f78419f4c6
注意:经测试发现当类型为VOTER时,如果tablet备份为3,新增加一个备份后变为4,过一段时间(5分钟以后),会自动变为三份。 NON-VOTER有待在kudu1.5.0版本测试
kudu tablet change_config change_replica_type
功能:修改ts_uuid中tablet_id的类型(VOTER/NON-VOTER)
kudu tablet change_config move_replica
功能:将tablet_id从from_ts_uuid移动至to_ts_uuid
注意:kudu1.4.0不支持,kudu1.5.0版本开始支持,可负载均衡
kudu tablet change_config remove_replica
功能:将tablet_id的备份从ts_uuid删除
kudu tablet change_config remove_replica 10.110.18.102:7051,10.110.18.184:7051,10.110.18.185:7051 08c7def983394ff3ac64b5292dfb5dea 1f854d396f54483ea9e5e537b6b63503
注意:经测试发现当tablet个数等于或小于备份数时,删除指定tablet不成功。即想要迁移tablet可以先迁移到的目标机器上新增tablet 然后再删除源tablet
kudu tserver set_flag
功能:设置指定flag
kudu tserver status
查看指定tserver_address的状态
kudu tserver timestamp
功能:获取tserver_address当前的时间戳
kudu tserver list
功能:获取集群中的tablet server
kudu wal dump [-print_entries=] [-noprint_meta] [-truncate_data=]
功能:显示指定path下的wal日志,path必须指定具体文件
kudu wal dump /data/kudu/tserver_data/wals/43c10f7d81144e3287a3f80aa0e0f684/wal-000000001
该操作会列数具体的wal内容,包括针对该tablet的具体操作
kudu table delete
功能:删除table_name表
kudu table list
功能:列举所有表以及tablets
kudu remote_replica check
功能:检查tserver_address的状态
kudu remote_replica copy
kudu remote_replica copy bd556b05db4f4446b0223163223ffce6 10.110.18.185:7050 10.110.18.176:7050 -force_copy
验证失败,错误如下: W1101 10:22:27.238106 31485 tool_action_remote_replica.cc:333] NOTE: this copy may happen asynchronously and may timeout if the tablet size is large. Watch the logs on the target tablet server for indication of progress.
功能:删除指定tserver_address的 tablet_id
kudu remote_replica delete 10.110.18.184:7050 bd556b05db4f4446b0223163223ffce6 movetablet
kudu remote_replica dump
功能:获取指定tserver_address指定tablet_id中的数据
kudu remote_replica dump 10.110.18.184:7050 bd556b05db4f4446b0223163223ffce6
结果如下: (int64 RowID=9, int64 ID=1, string NAME="kudu-content-1") (int64 RowID=5, int64 ID=1, string NAME="kudu-content-1")
kudu master set_flag master_address flag value [-force]
功能:为master_address节点设置参数
kudu master status
功能:查看master_address信息
kudu master timestamp
功能:获取master_address的时间戳
kudu master list
功能:列举集群的master信息
kudu local_replica copy_from_remote
功能:从source拷贝名为tablet_id到本地 [-fs_wal_dir=
kudu local_replica copy_from_remote 8a94ebf9a7ec487dbcde74a2937ffc72 10.110.18.185:7050 -fs_wal_dir=/data/kudu/tserver_data -fs_data_dirs=/data/kudu/tserver_data
测试出现异常,如下: I1102 09:29:36.918705 13489 fs_manager.cc:263] Time spent opening block manager: real 0.000s user 0.000s sys 0.000s IO error: Could not lock /data/kudu/tserver_data/data/block_manager_instance: Could not lock /data/kudu/tserver_data/data/block_manager_instance: lock /data/kudu/tserver_data/data/block_manager_instance: Resource temporarily unavailable (error 11)
kudu local_replica data_size ea3dbfb02bf6411aae64b63247c2d7a9 -fs_wal_dir=/data/kudu/tserver_wal -fs_data_dirs=/data/kudu/tserver_data -format=json
kudu local_replica list [-fs_wal_dir=
功能:获取 [-fs_wal_dir=
kudu local_replica cmeta print_replica_uuids
功能:获取[-fs_wal_dir=
kudu local_replica cmeta set_term
kudu local_replica cmeta rewrite_raft_config
kudu local_replica dump block_ids
功能:获取[-fs_wal_dir=
kudu local_replica dump block_ids b7de17353521401b95576999a0e53b1c -fs_wal_dir=/data/kudu/tserver_data -fs_data_dirs=/data/kudu/tserver_data
kudu local_replica dump meta
功能:获取[-fs_wal_dir=
kudu local_replica dump meta b7de17353521401b95576999a0e53b1c -fs_wal_dir=/data/kudu/tserver_data -fs_data_dirs=/data/kudu/tserver_data
kudu local_replica dump rowset
功能:获取[-fs_wal_dir=
kudu local_replica dump block_ids b7de17353521401b95576999a0e53b1c -fs_wal_dir=/data/kudu/tserver_data -fs_data_dirs=/data/kudu/tserver_data
kudu local_replica dump wals
功能:获取[-fs_wal_dir=
kudu local_replica dump wals b7de17353521401b95576999a0e53b1c -fs_wal_dir=/data/kudu/tserver_data -fs_data_dirs=/data/kudu/tserver_data
kudu fs check [-fs_wal_dir=
**功能:检测[-fs_wal_dir=
kudu fs check -fs_wal_dir=/data/kudu/tserver_data -fs_data_dirs=/data/kudu/tserver_data
kudu fs format [-fs_wal_dir=
功能:产生新文件系统[-fs_wal_dir=
```
[root@kudu-102 bin]# ./kudu fs format -fs_wal_dir=/data/kudu/ts_datas -fs_data_dirs=/data/kudu/ts_datas -uuid=b69cdeb85db14251afec1a952c1be9e9
I1103 02:24:16.666724 23882 env_posix.cc:1460] Not raising process file limit of 50000; it is already as high as it can go
I1103 02:24:16.666936 23882 file_cache.cc:463] Constructed file cache lbm with capacity 20000
I1103 02:24:16.671298 23882 fs_manager.cc:377] Generated new instance metadata in path /data/kudu/ts_datas/instance:
uuid: "b69cdeb85db14251afec1a952c1be9e9"
format_stamp: "Formatted at 2017-11-03 02:24:16 on kudu-102"
```
kudu fs dump block
功能:输出[-fs_wal_dir=
kudu fs dump cfile
功能:输出
kudu fs dump cfile 8 -fs_wal_dir=/data/kudu/tserver_data -fs_data_dirs=/data/kudu/tserver_data
kudu fs dump tree [-fs_wal_dir=
功能:输出[-fs_wal_dir=
kudu fs dump uuid [-fs_wal_dir=
功能:获取[-fs_wal_dir=
kudu perf loadgen