返回首页

gbase数据、南大通用产品文档:GBase8a设置节点状态并清理feventlog

更新日期:2024年09月11日

检查节点状态,集群状态应为normal,Coordinator 节点状态正常,确认被替换节点
是纯Data 节点后设置被替换节点状态为unavailable 状态。
操作步骤

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
298
步骤1:检查节点状态,集群状态应为normal,Coordinator 节点状态正常,被替换
的节点为DATA NODE。
$gcadmin showcluster vc vc1
CLUSTER STATE:
ACTIVE
VIRTUAL CLUSTER MODE:
NORMAL
=======================================================
|
GBASE VIRTUAL CLUSTER INFORMATION
|
=======================================================
|
VcName
| DistributionId |
comment
|
-------------------------------------------------------
|
vc1
|
1
| comment message vc1 |
-------------------------------------------------------
=========================================================================
==========
|
VIRTUAL CLUSTER DATA NODE INFORMATION
|
=========================================================================
==========
| NodeName |
IpAddress
| DistributionId |
gnode
|syncserver|DataState |
-----------------------------------------------------------------------------------
|
node1
| 172.168.83.11
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node2
| 172.168.83.12
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node3
| 172.168.83.15
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
3 data node
步骤2:
设置被替换节点状态为unavailable:
在操作系统的DBA 用户
(demo.options
文件中dbauser 参数指定的用户)下运行gcadmin setnodestate 命令设置要替换的节
点状态为unavailable。
$ gcadmin setnodestate 172.168.83.15 unavailable
after set node state into unavailable,can not set the state into normal,
must run gcadmin replacenodes to replace this node ,after that command node state can return into
normal.
you realy want to set node state into unavailable(yes or no)?
yes
get node data state by ddl fevent log start ......
get node data state by ddl fevent log end ......
get node data state by dml fevent log start ......
get node data state by dml fevent log end ......
get node data state by dml storage fevent log start ......
get node data state by dml storage fevent log end ......

GBase 8a MPP Cluster 产品手册
4 管理员指南
文档版本953(2022-09-15)
南大通用数据技术股份有限公司
299
check data server node data state by fevent log start ......
check data server node data state by fevent log end ......
set node [172.168.83.15] state to unavailable successful
查看集群状态:
$gcadmin showcluster vc vc1
CLUSTER STATE:
ACTIVE
VIRTUAL CLUSTER MODE:
NORMAL
=======================================================
|
GBASE VIRTUAL CLUSTER INFORMATION
|
=======================================================
|
VcName
| DistributionId |
comment
|
-------------------------------------------------------
|
vc1
|
1
| comment message vc1 |
-------------------------------------------------------
=========================================================================
==========
|
VIRTUAL CLUSTER DATA NODE INFORMATION
|
=========================================================================
==========
| NodeName |
IpAddress
| DistributionId |
gnode
|syncserver|DataState |
-----------------------------------------------------------------------------------
|
node1
| 172.168.83.11
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node2
| 172.168.83.12
|
1
|
OPEN
|
OPEN
|
0
|
-----------------------------------------------------------------------------------
|
node3
| 172.168.83.15
|
1
| UNAVAILABLE |
|
|
-----------------------------------------------------------------------------------
3 data node
步骤3:删除被替换节点的feventlog。
$ gcadmin rmfeventlog 172.168.83.15
after rmfeventlog 172.168.83.15, fevent log will be removed, must run gcadmin
replacenodes to replace this node.
you realy want to remove node 172.168.83.15 fevent log(yes or no)?
yes
delete ddl event log on node 172.168.83.15 start
delete ddl event log on node 172.168.83.15 end
delete dml event log on node 172.168.83.15 start
delete dml event log on node 172.168.83.15 end
delete dml storage event log on node 172.168.83.15 start
delete dml storage event log on node 172.168.83.15 end

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

由于GBase 数据库允许“0000-00-00”日期值存储到Date 类型字段,
“0000-00-00
00:00:00”和NULL 时间日期值存储到DateTime 类型,但这些日
期值都是无效的,.NET 框架的日期对象和日期时间对象不支持这些值。对于使
用无效日期的开发人员,日期处理上的差异可能产生问题。
因此.NET DataSet 对象不能使用GBaseDataAdapter 类的Fill 方法填充,
因为无效日期的转换将会引发System.ArgumentOutOfRangeException 异常。

ifx_rc_count() 函数返回行或集合中元素的数量。
语法
ifx_rc_count(rowcount, rchandle)
参数
该函数接受以下参数。
参数
类型
用于
描述
rowcount
SQL_SMALLINT
输出
行或集合中元素的数量
rchandle
HINFX_RC
输入
行或集合存取的句柄
用法
ifx_rc_count() 函数返回行或集合中元素的数量。