From 5398d3b2eb0db272d7ec734fa6f7d1956ccf4a11 Mon Sep 17 00:00:00 2001 From: KROSY Date: Fri, 25 Aug 2023 17:19:01 +0300 Subject: [PATCH] fix: fix topic templates --- src/containers/Tenant/utils/queryTemplates.ts | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/containers/Tenant/utils/queryTemplates.ts b/src/containers/Tenant/utils/queryTemplates.ts index 9af87877e..b74d57614 100644 --- a/src/containers/Tenant/utils/queryTemplates.ts +++ b/src/containers/Tenant/utils/queryTemplates.ts @@ -69,42 +69,42 @@ export const createTopicTemplate = (path: string) => { return `-- docs: https://ydb.tech/en/docs/yql/reference/syntax/create_topic CREATE TOPIC \`${path}/my_topic\` ( CONSUMER consumer1, - CONSUMER consumer2 WITH (read_from = Datetime('2022-12-01T12:13:22Z')) -- Sets up the message write time starting from which the consumer will receive data. + CONSUMER consumer2 WITH (read_from = Datetime('1970-01-01T00:00:00Z')) -- Sets up the message write time starting from which the consumer will receive data. -- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format). -- Default value: now ) WITH ( - min_active_partitions = 5, -- Minimum number of topic partitions. - partition_count_limit = 10, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited. - retention_period = Interval('PT12H'), -- Data retention period in the topic. Value type: Interval, default value: 18h. - retention_storage_mb = 1, -- Limit on the maximum disk space occupied by the topic data. + min_active_partitions = 1, -- Minimum number of topic partitions. + partition_count_limit = 0, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited. + retention_period = Interval('PT18H'), -- Data retention period in the topic. Value type: Interval. + retention_storage_mb = 0, -- Limit on the maximum disk space occupied by the topic data. -- When this value is exceeded, the older data is cleared, like under a retention policy. -- 0 is interpreted as unlimited. - partition_write_speed_bytes_per_second = 2097152, -- Maximum allowed write speed per partition. - partition_write_burst_bytes = 2097152 -- Write quota allocated for write bursts. - -- When set to zero, the actual write_burst value is equalled to - -- the quota value (this allows write bursts of up to one second). + partition_write_speed_bytes_per_second = 1048576, -- Maximum allowed write speed per partition. + partition_write_burst_bytes = 0 -- Write quota allocated for write bursts. + -- When set to zero, the actual write_burst value is equalled to + -- the quota value (this allows write bursts of up to one second). );`; }; export const alterTopicTemplate = (path: string) => { return `-- docs: https://ydb.tech/en/docs/yql/reference/syntax/alter_topic ALTER TOPIC \`${path}\` - ADD CONSUMER new_consumer WITH (read_from = 0), -- Sets up the message write time starting from which the consumer will receive data. - -- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format). - -- Default value: now - ALTER CONSUMER consumer1 SET (read_from = Datetime('2023-12-01T12:13:22Z')), + ADD CONSUMER new_consumer WITH (read_from = Datetime('1970-01-01T00:00:00Z')), -- Sets up the message write time starting from which the consumer will receive data. + -- Value type: Datetime OR Timestamp OR integer (unix-timestamp in the numeric format). + -- Default value: now + ALTER CONSUMER consumer1 SET (read_from = Datetime('1970-01-01T00:00:00Z')), DROP CONSUMER consumer2, SET ( - min_active_partitions = 10, -- Minimum number of topic partitions. - partition_count_limit = 15, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited. - retention_period = Interval('PT36H'), -- Data retention period in the topic. Value type: Interval, default value: 18h. - retention_storage_mb = 10, -- Limit on the maximum disk space occupied by the topic data. - -- When this value is exceeded, the older data is cleared, like under a retention policy. - -- 0 is interpreted as unlimited. - partition_write_speed_bytes_per_second = 3145728, -- Maximum allowed write speed per partition. - partition_write_burst_bytes = 1048576 -- Write quota allocated for write bursts. - -- When set to zero, the actual write_burst value is equalled to - -- the quota value (this allows write bursts of up to one second). + min_active_partitions = 1, -- Minimum number of topic partitions. + partition_count_limit = 0, -- Maximum number of active partitions in the topic. 0 is interpreted as unlimited. + retention_period = Interval('PT18H'), -- Data retention period in the topic. Value type: Interval. + retention_storage_mb = 0, -- Limit on the maximum disk space occupied by the topic data. + -- When this value is exceeded, the older data is cleared, like under a retention policy. + -- 0 is interpreted as unlimited. + partition_write_speed_bytes_per_second = 1048576, -- Maximum allowed write speed per partition. + partition_write_burst_bytes = 0 -- Write quota allocated for write bursts. + -- When set to zero, the actual write_burst value is equalled to + -- the quota value (this allows write bursts of up to one second). );`; };