返回首页

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

更新日期:2024年09月11日

功能
该参数用来配置consumer 本地缓存队列的长度,单位是DML 的条数。设计采用
本地缓存队列是为了平衡从kafka 获取消息和提交到集群这两个环节在性能上的
不匹配,保证有足够的数据执行提交。
表6- 43 参数值范围说明表
默认值
最小值
最大值
210000
100
10000000

11111 |
| 2013-12-17 14:11:16 | 3222.5600 |
1897 |
| 2013-12-17 14:11:16 |

invextend() 函数复制不同限定符之下的 interval 值。

扩展是添加或删除 INTERVAL 值的字段的操作,来使得它与给定的限定符相匹配。
对于 INTERVAL 值,两个限定符都必须属于同一 interval 类:或者 year to month 类,
或者 day to fraction(5) 类。

语法
mint invextend(in_inv, out_inv)
intrvl_t *in_inv, *out_inv;
in_inv
指向要扩展的 interval 变量的指针。
out_inv
指向带有有效的限定符用于扩展的 interval 变量的指针。

GBase 8s ESQL/C 编程指南
南大通用数据技术股份有限公司
- 842 -


用法
invextend() 函数将 in_invinterval 变量的限定符字段数字复制至 out_inv interval 变
量。out_inv 变量的限定符控制该复制。

该函数丢弃 in_inv 中最低有效字段右边的 out_inv 中的任何字段。该函数填写未出
现在 in_inv 中的 out_inv 中的任何字段,如下:
它以零填充 in_inv 中最低有效字段右边的字段。
它将 in_inv 中最高有效字段左边的字段设置为有效的 interval 值。

返回代码
0
转换成功。
<0
转换失败。
-1266
interval 值与该操作不兼容。
-1268
参数包含无效的 interval 限定符。



示例
demo 目录在文件 invextend.ec 中包含此样例程序。该示例程序说明 interval 扩展。
在第二个结果中,在 seconds 字段中,输出包含零,且已将 days 字段设置为 3。
/*
* invextend.ec *

The following program illustrates INTERVAL extension. It extends an INTERVAL value
to another INTERVAL value with a different qualifier. Note that in the second example, the
output contains zeros in the seconds field and the days field has been set to 3.
*/


GBase 8s ESQL/C 编程指南
南大通用数据技术股份有限公司
- 843 -

#include
EXEC SQL include datetime;

main()
{
mint x;
char out_str[16];
;
EXEC SQL BEGIN DECLARE SECTION;
interval hour to minute hrtomin;
interval hour to hour hrtohr;
interval day to second daytosec;
EXEC SQL END DECLARE SECTION;

printf("INVEXTEND Sample ESQL Program running.\n\n");

printf("Interval (hour to minute) value = 75.27\n");
incvasc("75:27", &hrtomin);

/* Extend to hour-to-hour and convert the internal format to
* ascii for displaying
*/
invextend(&hrtomin, &hrtohr);
intoasc(&hrtohr, out_str);
printf("Extended (hour to hour) value = %s\n", out_str);

/* Extend to day-to-second and convert the internal format to ascii for displaying
*/
invextend(&hrtomin, &daytosec);
intoasc(&daytosec, out_str);
printf("Extended (day to second) value =: %s\n", out_str);

printf("\nINVEXTEND Sample Program over.\n\n");

GBase 8s ESQL/C 编程指南
南大通用数据技术股份有限公司
- 844 -

}

输出
INVEXTEND Sample ESQL Program running.

Interval (hour to minute) value = 75:27
Extended (hour to hour) value = 75
Extended (day to second) value = 3 03:27:00
INVEXTEND Sample Program over.