返回首页

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

更新日期:2024年09月11日

功能
该参数用来配置consumer 从kafka 获取消息,最大支持的消息大小。
单位是字节。配置这个参数的时候需要注意,golden gate 生成最大消息的大小是
可配置的,
kafka server 能够接收的最大消息的大小也是可配置的,consumer 的配
置最好与golden gate 和kafka 一致。
表6- 41 参数值范围说明表
默认值
最小值
最大值
1000000
1
1000000000

TRUNCATE HIVE PARTITION
语法格式
TRUNCATE TABLE [database_name.]table_name PARTITION partition_spec;
参数说明

database_name:可选参数,表示表隶属的数据库名称。如果省略此参数,即为
USE 后的数据库名称。

table_name:是要执行的表的名称。

Partition_spec:是要删除的分区的名称。
功能
TRUNCATE TABLE 删除分区中的所有行,
但该分区保持不变。
适用于Hive 引擎的
分区表。
示例
示例1:

GBase UP 产品手册 5 数据库管理指南
文档版本04(2021-04-21) 南大通用数据技术股份有限公司 653
gbase> create table hp2(a int,b int) partitioned by (c int) engine=hive;
Query OK, 0 rows affected

gbase> insert into hp2 partition (c = 100) values (10,20);
Query OK, 1 row affected

gbase> select * from hp2;
+------+------+------+
| a | b | c |
+------+------+------+
| 10 | 20 | 100 |
+------+------+------+
1 row in set
gbase> show partitions from hp2;
+-----------+
| partition |
+-----------+
| c=100 |
+-----------+
1 row in set
gbase> create table hp2(a int,b int) partitioned by (c int) engine=hive;
Query OK, 0 rows affected
gbase> insert into hp2 partition (c = 100) values (10,20);
Query OK, 1 row affected

gbase> select * from hp2;
+------+------+------+
| a | b | c |
+------+------+------+
| 10 | 20 | 100 |
+------+------+------+
1 row in set

gbase> show partitions from hp2;
+-----------+
| partition |
+-----------+
| c=100 |
+-----------+
1 row in set

gbase> truncate table hp2 partition(c=100);
Query OK

gbase> show partitions from hp2;
+-----------+
| partition |
+-----------+
| c=100 |

GBase UP 产品手册 5 数据库管理指南
文档版本04(2021-04-21) 南大通用数据技术股份有限公司 654

在FOR LOOP语句中的EXIT WHEN语句
DECLARE
v_employees employees%ROWTYPE;
CURSOR c1 is SELECT * FROM employees;
BEGIN
OPEN c1;
-- Fetch entire row into v_employees record:
FOR i IN 1..10 LOOP
FETCH c1 INTO v_employees;
EXIT WHEN c1%NOTFOUND;
-- Process data here
END LOOP;
CLOSE c1;
END;