当前位置:网站首页>【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级存储、毫秒级时延、无损水平扩展和复杂数据结构等特性。同时具备丰富的生态、便捷的迁移、极低的运维成本和五个九高可用等特点。客户覆盖游戏、互联网、政务、金融、制造和物联网等领域。
边栏推荐
- SSH无密码登陆
- 凌晨三点学习的你,感到迷茫了吗?
- PHP实现 mqtt通信
- go实现分布式锁
- 88.(cesium篇)cesium聚合图
- 问题——adb shellerror: insufficient permissions for device: verify udev rules.
- 2D人体姿态估计 - DeepPose
- Différents arbres de recherche binaires [arbre de génération rétrospectif ascendant + recherche de mémoire - - espace - temps]
- Applet view creation
- 搭建nexus服务
猜你喜欢

设备监理师证书含金量怎样?值得考吗?

The four traversal methods of the map set can be seen at a glance

2022-2028 global bubble CPAP system industry survey and trend analysis report

FPGA (VIII) RTL code IV (basic circuit design 1)

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

vim配置与使用
![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]

2022-2028 global UAV detection radar industry research and trend analysis report

Solid state and memory module purchase

FPGA(八)RTL代码之四(基本电路设计1)
随机推荐
Web APIs 高阶函数 丨黑马程序员
Zigzag sequence traversal of binary tree [one of layered traversal methods - > preorder traversal +level]
Différents arbres de recherche binaires [arbre de génération rétrospectif ascendant + recherche de mémoire - - espace - temps]
Basic MySQL database operations
SSH login without password
Etcd教程 — 第七章 Etcd之事务API
【面试指南】AI算法面试
MySQL advanced SQL statement (Part 2)
不同的二叉搜索树[自下而上回溯生成树+记忆搜索--空间换时间]
2022/02/15
相同的树[从部分到整体]
无法定位程序输入点 [email protected]
Sequence traversal of binary tree ii[one of sequence traversal methods - > recursive traversal + level]
Leetcode daily question - 324 Swing sort II
priority_ Understanding of queue
Vscode plug-in used now
Set up nexus service
Several ways to add breakpoints using GDB
Bluebridge cup 2022 preliminaries - minesweeping
Allegro's method of setting network flying line and network color