评论

收藏

[NoSQL] 【TcaplusDB知识库】表格组相关操作命令

数据库 数据库 发布于:2021-12-29 13:29 | 阅读数:452 | 评论:0

【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")
命令功能:

  • 支持删除指定表格组信息(云版&本地版本)
注意:

  • 删除命令具有高风险性,请操作之前谨慎确认,避免误删
DSC0000.png
TcaplusDB是腾讯出品的分布式NoSQL数据库,存储和调度的代码完全自研。具备缓存+落地融合架构、PB级存储、毫秒级时延、无损水平扩展和复杂数据结构等特性。同时具备丰富的生态、便捷的迁移、极低的运维成本和五个九高可用等特点。客户覆盖游戏、互联网、政务、金融、制造和物联网等领域。


关注下面的标签,发现更多相似文章