返回首页

gbase数据、南大通用产品文档:GBase8a| 1920 |

更新日期:2024年09月11日

| Allen
| 56.0 |

 摘要:
返回作用在连接上的最近查询的列数。该函数的正常使用是在
gbase_store_result()返回NULL(因而没有结果集指针)时。在这种情况下,
可调用gbase_field_count()来判定gbase_store_result()是否应生成非空结
果。这样,客户端就能采取恰当的动作,而无需知道查询是否是SELECT(或类
似SELECT 的)语句。
 语法:
unsigned int gbase_field_count(GBASE *gbase);
 参数:
 返回值:
表示结果集中列数的无符号整数。

执行initnodedatamap 命令初始化hashmap,然后将数据通过rebalance instance 命令
重分布到最新的distribution(Distribution ID:3)上。

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-04-10)
南大通用数据技术股份有限公司
340
说明

按distribution 分布规则,此次rebalance 操作不会实际进行数据搬移,所
以会很快完成;

本次rebalance 操作后不要删掉旧版nodedatamap 和distribution。
操作步骤
步骤1 :
步骤1:初始化hashmap:
$ gccli -uroot
GBase client 9.5.3.17.117651. Copyright (c) 2004-2020, GBase.
All Rights
Reserved.
gbase> use vc vc2;
Query OK, 0 rows affected (Elapsed: 00:00:00.00)
gbase> initnodedatamap;
Query OK, 0 rows affected, 5 warnings (Elapsed: 00:00:01.45)
步骤2:执行数据重分布:
gbase> rebalance instance;
Query OK, 3 rows affected (Elapsed: 00:00:05.60)
查看rebalance 状态:
gbase>
select
index_name,status,percentage,priority,host,distribution_id
from
gclusterdb.rebalancing_status;
+------------+-----------+------------+----------+---------------+-----------------+
| index_name | status
| percentage | priority | host
| distribution_id |
+------------+-----------+------------+----------+---------------+-----------------+
| demo.tt
| COMPLETED |
100 |
5 | 172.168.83.14 |
3 |
| demo.t
| COMPLETED |
100 |
5 | 172.168.83.14 |
3 |
| demo.ttt
| COMPLETED |
100 |
5 | 172.168.83.14 |
3 |
+------------+-----------+------------+----------+---------------+-----------------+
3 rows in set (Elapsed: 00:00:00.17)
gbase> quit
Bye