【TcaplusDB知識庫】下載使用TcaplusDB Client
阿新 • • 發佈:2021-12-15
tcaplus_client 是一個 TcaplusDB 表訪問的客戶端工具,C++編寫,可以用於從命令列管理TcaplusDB。目前工具整合在C++ SDK中.
下載
Client | 版本 | 下載地址 |
---|---|---|
TcaplusPbApi3.36.0.192960.x86_64_release_20200115.tar.gz | 3.36.0 | |
TcaplusPbApi3.46.0.199506.x86_64_release_20211129.tar.gz | 3.46.0 |
安裝
下載完成 TcaplusServiceApi 安裝包後,將其上傳至可與 TcaplusDB網路聯通的伺服器中。
上傳完成後,執行下列命令解壓安裝包。
mkdir tcaplus && tar -xf TcaplusPbApi3.46.0.199506.x86_64_release_20211129.tar.gz -C tcaplus
解壓完成後,進入至 tcaplus 的 bin 目錄中,並賦予可執行許可權:
cd tcaplus/release/x86_64/bin chmod +x tcaplus_client
直接執行./tcaplus_client
命令,會提示連線資料庫所需的引數資訊,使用者可以根據自己的叢集資訊進行填寫。
注意:下文示例中,app_id 代表業務 ID、zone_id 代表遊戲區ID。
# ./tcaplus_client
--------------------------------------------------------------------------------
invalid parameters, please start the client as following:
./tcaplus_client -a access_id -z tablegroup_id [-s signature] -d dir_server_url [-t table_name] [-l log_file.xml] [-T tdr_file.tdr] [-e execute_command].
the params in [] are optional, and their order is not important.
-a(--app_id) APP_ID or Access ID of Cluster.
-z(--zone_id) ZONE ID or TableGroup Id.
-s(--signature) PASSWORD.
-d(--dir) dir server addr.
-t(--table) table to add.
-l(--log) log file name that must be client_log.xml, and log class name be client.
-T(--tdr) tdr filename.
-e(--execute) SQL command need to execute, the content should be in quotes.
e.g. ./tcaplus_client -a 2 -z 3 -s "FE6533875C8385C3" -d 172.25.40.181:9999 -T table_test.tdr -e "select a, b from table where key = 1;".
連線 TcaplusDB
使用命令連線 TcaplusDB,如下示例中,訪問點資訊如下:
-
業務ID:3 (叢集接入ID)
-
連線密碼:****(叢集/業務訪問密碼)
-
內網地址:內網埠:10.125.32.21:9999
-
遊戲區ID:1 (表格組id)
# ./tcaplus_client -a 2 -z 3 -s 51BD7E6215D6F0BE -d 9.135.8.93:9999
====== Welcome to use tcaplus_client, use "help" to show usage ======
tcaplus>
在提示符之後輸入 help,可看到進一步的幫助資訊,通過 > help 具體命令
可以檢視具體使用方法。
tcaplus> help;
--------------------------------------------------------------------------------
help: show usage of commands, example: "help select;".
show: get server status related information. executing "help show;" for details.
exit/quit: exit the client.
count: print record number in the database.
desc: print table field name and type.
select: query records from database.
insert: insert a new record into database.
replace: replace a record into the database.
update: update a record in the database.
delete: delete record(s) from database.
dump: dump records from database.
load: load records into the database.
--------------------------------------------------------------------------------
TcaplusDB是騰訊出品的分散式NoSQL資料庫,儲存和排程的程式碼完全自研。具備快取+落地融合架構、PB級儲存、毫秒級時延、無損水平擴充套件和複雜資料結構等特性。同時具備豐富的生態、便捷的遷移、極低的運維成本和五個九高可用等特點。客戶覆蓋遊戲、網際網路、政務、金融、製造和物聯網等領域。