当前位置:网站首页>[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (I)
[tcapulusdb knowledge base] Introduction to tcapulusdb tcapsvrmgr tool (I)
2022-06-29 03:32:00 【Database master】
Enter the tool Directory , Input ./tcapsvrmgr help You can get a list of commands supported by the tool , As shown below :
restore
getcount
compare
listmeta
filterrecord
listrecord
listrecordsize
printenginestat
printindexstat
changeid
deletebykey
import
getrecord
partkeyrestore
changelocalsequence
changesuccsyncsequence
overwritesuccsyncseqwithlocalseq
checklistindexelement
listindexusage
Be careful :
When using tools , The version of the tool must be the same as svr Consistent versions of
When copying or backing up engine files , The corresponding... Must be stopped correctly first svr process
When using tools on engine files or ulog Before file operation , Please pay attention to the backup
It is recommended to put the files and tools required by the command in the same directory , Or use the absolute path to specify the file
perform ./tcapsvrmgr help You can get subcommand The detailed introduction and usage of .
1. restore
This command is used to clean up or restore engine files , The command format is ./tcapsvrmgr restore engfile [--quick --no-backup --no-report --output= --dest-eng-file-args= --compress= --last-access-time= ], among ,engfile Is a required parameter , Indicates the engine file to be collated or recovered , The meanings of other optional parameters are as follows :
--quick Specifying this parameter means that the quick mode
--no-backup Specifying this parameter means that the source engine files will not be backed up
--no-report Specifying this parameter means that no statistical report will be generated
--output This parameter specifies the directory of the target engine file , If you do not specify this parameter , Is the same as the source engine file directory
--dest-eng-file-args This parameter is used to set the parameters of the target engine file , Such as --dest-eng-file-args=#bnum=750000#xmsiz=10000000, If you do not specify this parameter , Keep the same as the source engine file
--compress Specify the compression algorithm to use when generating the target engine file ,no Indicates no compression ,snappy Said the use of snappy Compression algorithm
--last-access-time Specifying this parameter means setting the latest access time of data in the target engine file to the specified value , The value range of this parameter is [0, 1893427200]
When the parameter configuration of the engine file is unreasonable , Can pass restore Command to reconfigure ; When the engine file is corrupted ( Such as tcapsvr The process is kill fall ) when , have access to restore Command to repair .
Example : Be right AppID=2,ZoneID=3,Table_Name=test_table,ShardID=1 When repairing the engine file of , It can be executed ./tcapsvrmgr restore /data1/1.2.2.2/AppID_2_ZoneID_3/test_table_1.txh --output=./ --quick --compress=snappy --log-level=debug
2. getcount
This command is used to get the number of records in the specified engine file , The command format is ./tcapsvrmgr getcount engfile,engfile Represents an engine file .
Example :./tcapsvrmgr getcount /data1/1.2.2.2/AppID_2_ZoneID_3/test_table_1.txh
3. compare
This command is used to determine whether the data in the two engine files are consistent , The command format is ./tcapsvrmgr compare --eng-file=1.txh --dest-eng-file=2.txh [--check-data-version --check-access-time --print-miss-value], among , The first two required parameters are the two engine files to compare , The following three optional parameters have the following meanings :
--check-data-version Specifying this parameter means checking whether the data version is consistent
--check-access-time Specify this parameter to check whether the last access time of data is consistent
--print-miss-value Specifying this parameter means that the missing records in the engine file with a small number of records are printed to the file
Example : On the primary and standby nodes AppID=2,ZoneID=3,Table_Name=test_table,ShardID=1 Engine files for comparison , It can be executed ./tcapsvrmgr compare --eng-file=/data1/1.2.2.1/AppID_2_ZoneID_3/test_table_1.txh --dest-eng-file=/data1/1.2.2.2/AppID_2_ZoneID_3/test_table_1.txh
4. listmeta
This command is used to get the... Of the specified engine file AppID、ZoneID、Table_Name、ShardID、CheckPoint、SuccSyncSequence And table structure , The command format is ./tcapsvrmgr listmeta engfile,engfile Represents an engine file .
Example :./tcapsvrmgr listmeta test_table_1.txh
5. filterrecord
This command is used to filter the records in the specified engine file according to a certain rule , And save the filtered records to a new engine file , And the generated engine file has the same parameters as the source engine file .
The command format is ./tcapsvrmgr filterrecord filter.so test_table_1.txh, among filter.so Dynamic library files generated for users ,test_table_1.txh For engine files .
Suppose the code file used to filter records is filter.cpp, have access to g++ -fPIC -shared -g -lstdc++ filter.cpp -o filter.so Generate the corresponding dynamic link library file . stay filter.cpp In file , It needs to be realized according to specific requirements FilterRecord function .
FilterRecord Example of function Expand the source code
Generate... According to the above function example so Document and execute filterrecord After the command , You will get two new engine files :one_test_table_1.txh and two_test_table_1.txh, Save separately TimeKey=1 And TimeKey=2 The record of , have access to listrecord or getrecord Command to view the newly generated engine file .
For more information, please pay attention to TcaplusDB WeChat official account , In the wind and rain , We've been waiting for you !

TcaplusDB It's a distributed product of Tencent NoSQL database , The code for storage and scheduling is completely self-developed . With cache + Landing fusion architecture 、PB Levels of storage 、 Millisecond delay 、 Lossless horizontal expansion and complex data structure . At the same time, it has rich ecological environment 、 Easy migration 、 Extremely low operation and maintenance costs and five nine high availability features . Customer coverage game 、 Internet 、 government affairs 、 Finance 、 Manufacturing and the Internet of things .
边栏推荐
- Vscode plug-in used now
- 2022-2028 global low carbon concrete industry research and trend analysis report
- 【TcaplusDB】祝大家端午安康!
- Counter analysis of the parameter anti content in the backstage of the # yyds dry goods inventory # knife fight shop
- 【TcaplusDB知识库】查看tcapdir目录服务器
- Web APIs high order functions - dark horse programmers
- [tcapulusdb knowledge base] Introduction to tcapulusdb data import
- 初探元宇宙存储,数据存储市场下一个爆点?
- 88.(cesium篇)cesium聚合图
- 【TcaplusDB知识库】TcaplusDB数据导入介绍
猜你喜欢
![[thread communication]](/img/32/7374fd2eb9ae613f00415c86cb245e.png)
[thread communication]
![相同的树[从部分到整体]](/img/2d/997b9cb9cd4f8ea8620f5a66fcf00a.png)
相同的树[从部分到整体]
![[North Asia data recovery] data recovery case of ibm-ds3512 storage server RAID5 damaged data loss](/img/84/c8604f539db4658049406080d7f09a.jpg)
[North Asia data recovery] data recovery case of ibm-ds3512 storage server RAID5 damaged data loss

87.(cesium篇)cesium热力图(贴地形)
![Jerry's watch obtains alarm mode settings [chapter]](/img/43/987d864ec6038b10138ce50bcbdf12.jpg)
Jerry's watch obtains alarm mode settings [chapter]

2022-2028 global pneumatic test probe industry survey and trend analysis report

MySQL advanced SQL statement (Part 2)
![Jerry's monitoring alarm clock [chapter]](/img/b7/a5ca7a79af51bd79e4f5c1322b72ff.jpg)
Jerry's monitoring alarm clock [chapter]

【雲原生】這麼火,你不來了解下?
![The continued movement of Jerry's watch [chapter]](/img/3e/f8b98997320580431a8e7117f4a506.jpg)
The continued movement of Jerry's watch [chapter]
随机推荐
2022-2028 global secondary butyl lithium industry research and trend analysis report
Etcd教程 — 第七章 Etcd之事务API
Restore the binary search tree [simulate according to the meaning of the question - > find the problem - > analyze the problem - > see the bidding]
go-redsync分布式锁源码解析
Concise words tell about technical people who must master basic IT knowledge and skills. Part 1
Wechat applet development Basics
想当设备管理师?满足这三个报考条件就可以
Basic concepts of graph theory
Linear and nonlinear structures
FortiGate firewall configuration log uploading regularly
Grafana入门教程
Setting alarm mode of Jerry's watch [chapter]
Yyds dry inventory difference between bazel and gradle tools
[Ubuntu] [MySQL] Ubuntu installs mysql, but the compilation error is mysql h: No such file or directory
【面试指南】AI算法面试
An internal error occurred during: 'Retrieving archetypes:'.
【Ubuntu】【Mysql】ubuntu安装了mysql 但是编译报错 mysql.h: No such file or directory
django model生成docx数据库设计文档
Inventory deduction based on redis
【TcaplusDB知识库】查看tcapdir目录服务器