返回首页

gbase数据、南大通用产品文档:GBase8agcluster_shrink_to_rebalance

更新日期:2024年09月11日

控制rebalance 实现shrink space 功能。
默认值0,取值0:关闭shrink to rebalance 功能;
取值1:打开shrink to rebalance 功能;
说明
1. 打开gcluster_shrink_to_rebalance 参数时,执行alter table t1 shrink space full
或者alter table t1 shrink space full block_reuse_ratio=命令时走rebalance 逻
辑,创建中间表,使用SIS 把原表数据转存到中间表,删除原表,rename 中间表
为原表达到shrink 功能目标。
2. 本功能不会导致数据量在各分片间转移,属于n1 分片的数据仍然属于n1,不
会转移到n2。
3. 本功能支持failover。在执行过程中发生failover,依据宕机时正在执行的步骤
决定接管后是继续完成,还是会滚到初始状态。
4.
gcluster_rebalancing_parallel_degree

gcluster_rebalancing_step

gcluster_rebalancing_immediate_recover_internal_table 对本功能生效。
5. 本功能执行时不更新gcluster_rebalancing_status 系统表。

操作场景
多VC 模式,需要在每个VC 下创建distribution。
操作步骤
步骤1
编辑vc1 的创建distribution 的配置文件gcChangeInfo_vc1.xml。在指定VC 中创建
distribution 时,创建distribution 的配置文件gcChangeInfo_vc1.xml 中的node IP 与
创建VC 的配置文件中的node IP 一致。
示例:编辑在vc1 上创建distribution 的配置文件gcChangeInfo_vc1.xml 内容如下:
$cd gcinstall
$cp gcChangeInfo.xml gcChangeInfo_vc1.xml
$vi /opt/gcinstall/gcChangeInfo_vc1.xml











步骤2
在安装目录下,执行创建distribution 命令。
gcadmin distribution

[d num] [pattern 1|2]
表3- 10 参数说明
参数名称


gcChangeInfo.xml
指定生成distribution 规则的配置文件。
p number
每个数据节点存放的分片数量,最小值为1。
d number
每个分片的备份数量,取值为0,1 或2。若不输入参数d,
默认值为1。

GBase 8a MPP Cluster 产品手册
3 集群安装升级与卸载
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
81
参数名称


pattern number
生成distribution 所使用模式,
取值为1 或2,pattern 1 为负载
均衡模式,
pattern 2 为高可用模式。
若不输入参数pattern,

认使用pattern 1 生成distribution。
vc vcname
要创建distribution 的vc 名称。
说明

gcadmin distribution 是gcadmin 的子命令,详细说明请参考4.3.1 gcadmin
章节。
执行结果如下:
$cd /opt/gcinstall
$ gcadmin distribution gcChangeInfo_vc1.xml p 1 d 1 vc vc1
gcadmin generate distribution ...
NOTE: node [192.168.146.21] is coordinator node, it shall be data node too
NOTE: node [192.168.146.20] is coordinator node, it shall be data node too
gcadmin generate distribution successful
说明

在某个VC 上创建distribution 时,gcChangeInfo_vc1.xml 文件中的node ip
要与创建VC 时配置文件中的node ip 一致;

创建distribution 时必须指定vc name,当集群只有一个vc 时,默认在该vc
上生成distribution 可以不指定vcname。

backwrite_quantity
参数说明:描述行存储使用ADIO 写入IO 量的大小。
该参数属于USERSET 类型参数,请参考表15-1 中对应设置方法进行设置。
取值范围:整型,128~131072,单位为8KB。
默认值:8MB (1024 * 8KB)