当前位置:网站首页>【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(三)
【TcaplusDB知识库】TcaplusDB-tcapsvrmgr工具介绍(三)
2022-06-29 03:26:00 【数据库大师】
10. changeid
该命令用于修改指定引擎文件中的AppID、ZoneID、Table_Name、ShardID,命令格式为 ./tcapsvrmgr changeid -f engfile -A app_id -Z zone_id -T table_name -S shard_id,engfile表示引擎文件。
示例:./tcapsvrmgr changeid -f test_table_1.txh -A 1 -Z 1 -T test -S 2,可以使用listmeta命令查看修改是否生效。
11. deletebykey
该命令用于从运行中的TcaplusDB中删除指定记录,命令格式为 ./tcapsvrmgr deletebykey configfile,configfile为deletebykey命令的配置文件。
示例:./tcapsvrmgr deletebykey tcapsvrmgr_deletebykey_cfg.xml
在tcapsvrmgr_deletebykey_cfg.xml中,指定了DirServerAddr、PassWord、AppID、ZoneID、Table_Name以及要删除的key所在的文件路径名等信息。
用于记录要删除的记录的key文件需要遵循固定格式:(1)文件的第一行为各个key字段的名称,从第二行开始为每条要删除的记录的key字段的值;(2)各个字段之间以空格分隔。
如某张数据表有两个key字段key1、key2,分别为整型和浮点型。如果要删除key1=10 key2=6.8这条记录,则key文件的第一行应为“key1 key2”,第二行应为“10 6.8”
deletebykey命令的配置文件模板与说明 展开源码
12. import
该命令用于将引擎文件中的部分或全部记录导入到运行中的TcaplusDB中,命令格式为 ./tcapsvrmgr import configfile,configfile为import命令的配置文件。
示例:./tcapsvrmgr import tcapsvrmgr_import_cfg.xml
在tcapsvrmgr_import_cfg.xml中,指定了DirServerAddr、PassWord以及要导入的引擎文件的AppID、ZoneID、Table_Name、ShardID等信息;若只导入引擎文件中的部分记录,则还要指定要导入的记录的key文件路径名,key文件的格式要求与deletebykey命令相同。
import命令的配置文件模板与说明(导入全部记录) 展开源码
import命令的配置文件模板与说明(导入部分记录) 展开源码
13. getrecord
该命令用于从指定引擎文件中获取指定记录,命令格式为 ./tcapsvrmgr getrecord configfile,configfile为getrecord命令的配置文件。
示例:./tcapsvrmgr getrecord tcapsvrmgr_getrecord_cfg.xml
在tcapsvrmgr_getrecord_cfg.xml中,指定了用于获取记录的引擎文件的AppID、ZoneID、Table_Name、ShardID以及需要获取的记录数目、对应的key字段等信息。
getrecord命令的配置文件模板与说明 展开源码
14. partkeyrestore
该命令用于部分key回档,即将指定引擎文件中的部分key记录导入到运行中的TcaplusDB中,命令格式为 ./tcapsvrmgr partkeyrestore configfile,configfile为partkeyrestore命令的配置文件。
示例:./tcapsvrmgr partkeyrestore tcapsvrmgr_partkeyrestore_cfg.xml
在tcapsvrmgr_partkeyrestore_cfg.xml中,指定了DirServerAddr、PassWord、要导入的引擎文件的AppID、ZoneID、Table_Name、ShardID以及要回档的部分key等信息。注意:这里使用的partkey必须在数据库中建立了索引。
partkeyrestore命令的配置文件模板与说明 展开源码
15. changelocalsequence
该命令用于修改指定引擎文件中的CheckPoint信息,命令格式为 ./tcapsvrmgr changelocalsequence -f engfile -p x,其中,engfile为引擎文件,x为要设置的CheckPoint的值。
示例:./tcapsvrmgr changelocalsequence -f test_table_1.txh -p 12,可以使用listmeta命令查看修改是否生效。
16. changesuccsyncsequence
该命令用于修改指定引擎文件中的SuccSyncSequence信息,命令格式为 ./tcapsvrmgr changesuccsyncsequence -f engfile -s x,其中,engfile为引擎文件,x为要设置的SuccSyncSequence的值。
示例:./tcapsvrmgr changesuccsyncsequence -f test_table_1.txh -s 91,可以使用listmeta命令查看修改是否生效。
17. overwritesuccsyncseqwithlocalseq
该命令使用指定引擎文件中CheckPoint字段的值覆盖SuccSyncSequence字段的值,命令格式为 ./tcapsvrmgr overwritesuccsyncseqwithlocalseq -f engfile,其中,engfile为引擎文件。
示例:./tcapsvrmgr overwritesuccsyncseqwithlocalseq -f test_table_1.txh,可以使用listmeta命令查看修改是否生效。
18. checklistindexelement
该命令用于找出指定引擎文件中index crash的key和element crash的key,所谓index crash,是指list表中index指向的element找不到;所谓element crash,是指某些element找不到与之对应的index。
命令格式为 ./tcapsvrmgr checklistindexelement engfile index_crash_key_file element_crash_key_file,三个参数的具体含义如下:
engfile 表示要检查的list表的引擎文件
index_crash_key_file 用于保存index crash的key的文件,文本形式
element_crash_key_file 用于保存element crash的key的文件,文本形式
示例:./tcapsvrmgr checklistindexelement /txh/AppID_2_ZoneID_3/table_traverser_list_2.txh index_crash.txt element_crash.txt
19. listindexusage
该命令用于查询list表的索引使用情况,命令格式为 ./tcapsvrmgr listindexusage engfile,其中,engfile为list表的引擎文件。
示例:./tcapsvrmgr listindexusage table_list_2.txh
更多信息请关注TcaplusDB微信公众号,风里雨里,我们一直在等你!

TcaplusDB是腾讯出品的分布式NoSQL数据库,存储和调度的代码完全自研。具备缓存+落地融合架构、PB级存储、毫秒级时延、无损水平扩展和复杂数据结构等特性。同时具备丰富的生态、便捷的迁移、极低的运维成本和五个九高可用等特点。客户覆盖游戏、互联网、政务、金融、制造和物联网等领域。
边栏推荐
- 2022-2028 global industrial lithium chloride industry research and trend analysis report
- 恢复二叉搜索树[根据题意模拟->发现问题->分析问题->见招拆招]
- Digital twin application of smart Park Based on Web GIS aerial photography
- The four traversal methods of the map set can be seen at a glance
- Stm32l4 Series MCU ADC accurately calculates input voltage through internal reference voltage
- Codeforces Round #771 (Div. 2) ABC
- 2022-2028 global secondary butyl lithium industry research and trend analysis report
- Jerry's watch begins to move [chapter]
- Tu ne peux pas comprendre le feu?
- set time format
猜你喜欢

Yyds dry inventory everything a primary developer should know about activity

FPGA (VIII) RTL code IV (basic circuit design 1)
![Sequence traversal of binary tree ii[one of sequence traversal methods - > recursive traversal + level]](/img/f9/efb73dd6047e6d5833581376904788.png)
Sequence traversal of binary tree ii[one of sequence traversal methods - > recursive traversal + level]

FortiGate firewall configuration log uploading regularly

Stm32l4 Series MCU ADC accurately calculates input voltage through internal reference voltage

【云原生】这么火,你不来了解下?

Allegro's method of setting network flying line and network color

Bluebridge cup 2022 preliminaries - minesweeping

For safe login of wechat applet, the openid returned by wechat must be verified first to ensure the uniqueness of information.

迅为龙芯开发板pmon下Ejtag-设置硬件断点指令
随机推荐
凌晨三点学习的你,感到迷茫了吗?
Access 500 error after modstart migrates the environment
LeetCode 每日一题——324. 摆动排序 II
Is it safe for qiniu school to open an account in 2022?
相同的树[从部分到整体]
Certification training | streamnational certification training phase 2
Open source demo| you draw and I guess -- make your life more interesting
SSH login without password
VIM configuration and use
Linear and nonlinear structures
go实现分布式锁
priority_ Understanding of queue
Jerry's watch begins to move [chapter]
Jerry's watch obtains alarm mode settings [chapter]
如何理解MySQL的索引?
Different binary search trees [bottom-up backtracking spanning tree + memory search -- space for time]
Mobaihe box, ZTE box, Migu box, Huawei box, Huawei Yuehe box, Fiberhome box, Skyworth box, Tianyi box and other operators' box firmware collection and sharing
Jerry's monitoring alarm clock [chapter]
Allegro's method of setting network flying line and network color
Get error: Unsupported fork ordering: eip150block not enabled, but eip155block enabled at 0