1. 程式人生 > 其它 >【TcaplusDB知識庫】表格組相關操作命令

【TcaplusDB知識庫】表格組相關操作命令

【TcaplusDB知識庫】表格組相關操作命令

說明

表格組相關命令支援騰訊雲TcaplusDB版本和本地Docker版本。

幫助資訊

執行tcapluscli tablegroup -h可檢視幫助資訊,如下:

Provide baseic commands to operate TcaplusDB tablegroup. The basic commands includes: create, delete and describe

Usage:
tcapluscli tablegroup [flags]
tcapluscli tablegroup [command]

Examples:
./tcapluscli tablegroup [create | delete | describe ] [flags]

Available Commands:
create Create a table group of TcaplusDB. [Cloud | Docker ]
delete Delete a table group. [Cloud | Docker]
describe Get table group description. [Cloud | Docker]

Flags:
-h, --help help for tablegroup

Use "tcapluscli tablegroup [command] --help" for more information about a command.

命令功能:

  • 支援表格組建立

  • 支援表格組刪除

  • 支援表格組資訊查詢

建立表格組

執行tcapluscli tablegroup create -h獲取幫助資訊,如下:

Create a table group of TcaplusDB. Support creating table group in local docker environment.
Note: The table cluster should be created first before creating table group. The local docker env requires some flags ( 'group-id', 'endpoint-url') and removes flags ( 'region', 'cluster-id' )

Usage:
tcapluscli tablegroup create [flags]

Examples:
Cloud Env: ./tcapluscli tablegroup create --region=ap-shanghai --cluster-id=12434 --group-name=tb_group_1
Docker Env: ./tcapluscli tablegroup create --endpoint-url=http://localhost --access-id=[2|3] --group-name=zone_1 --group-id=1

Flags:
-a, --access-id string required in docker env: available value [2|3], 2: default cluster of TDR, 3: default cluster of PROTO.
-c, --cluster-id string required in cloud env: tcaplusdb cluster id
-u, --endpoint-url string required in local docker env : endpoint url (ip:port) for local docker env
-g, --group-id string required in local docker env: tcaplusdb table group id
-n, --group-name string required: tablegroup name,group name format: mix of letter, digit, and _. Legal name: zone_5, illegal name: zone-5
-h, --help help for create
-r, --region string required in cloud env: region name of cluster (default "ap-shanghai")

命令功能:

  • 支援建立指定Region,叢集下的表格組,需要傳入新建表格組的id和名稱

  • 支援雲版本表格組建立

  • 支援Docker版表格組建立,需要帶上endpoint-url 引數

查詢表格組資訊

執行tcapluscli tablegroup describe -h獲取幫助資訊,如下:

Get table group description.
If no flag 'group-id', all tablegroup infos of cluster will be returned, if flags with 'group-id', the specified table group will be returned.
Support get table group descriptions of local docker env with '--endpoint-url' flag

Usage:
tcapluscli tablegroup describe [flags]

Examples:
Cloud Env: ./tcapluscli tablegroup describe --region=ap-shanghai --cluster-id=123 [--group-id=1]
Cloud Env: ./tcapluscli tablegroup describe --region=ap-shanghai --cluster-id=123 --list
Docker Env: ./tcapluscli tablegroup describe --endpoint-url=http://localhost --access-id=[2|3] --group-id=1
Docker Env: ./tcapluscli tablegroup describe --endpoint-url=http://localhost --access-id=[2|3] --list

Flags:
-a, --access-id string required in docker env: available value [2|3], 2: default cluster of TDR, 3: default cluster of PROTO.
-c, --cluster-id string required in cloud env: tcaplusdb cluster id
-u, --endpoint-url string required in docker env : the endpoint url (ip:port) for local docker env, exposed by docker as webservice api
-g, --group-id string optional: tcaplusdb table group id
-h, --help help for describe
-l, --list list all tablegroup infos, if 'group-id' is empty, 'list' flag must be existed
-r, --region string required in cloud env: region name of table group (default "ap-shanghai")

命令功能:

  • 支援查詢指定的表格組資訊(雲上版本&docker版)

  • 支援查詢所有叢集下的表格組資訊 (雲上版本& docker版)

刪除表格組資訊

執行tcapluscli tablegroup delete -h獲取幫助資訊,如下:

Delete a table group.  Support deleting tablegroups of local docker env with --endpoint-url flag

Usage:
tcapluscli tablegroup delete [flags]

Examples:
Cloud Env: ./tcapluscli tablegroup delete --region=ap-shanghai --cluster-id=123455 --group-id=1
Docker Env: ./tcapluscli tablegroup delete --endpoint-url=http://localhost --access-id=[2 | 3] --group-id=1

Flags:
-a, --access-id string required in docker env: available value [2|3], 2: default cluster of TDR, 3: default cluster of PROTO.
-c, --cluster-id string required in cloud env: tcaplusdb cluster id
-u, --endpoint-url string required in docker env: endpoint url of docker env
-g, --group-id string required: tcaplusdb table group id
-h, --help help for delete
-r, --region string required in cloud env: region name of table group (default "ap-shanghai")

命令功能:

  • 支援刪除指定表格組資訊(雲版&本地版本)

注意:

  • 刪除命令具有高風險性,請操作之前謹慎確認,避免誤刪


TcaplusDB是騰訊出品的分散式NoSQL資料庫,儲存和排程的程式碼完全自研。具備快取+落地融合架構、PB級儲存、毫秒級時延、無損水平擴充套件和複雜資料結構等特性。同時具備豐富的生態、便捷的遷移、極低的運維成本和五個九高可用等特點。客戶覆蓋遊戲、網際網路、政務、金融、製造和物聯網等領域。