From 7d4ba94d472dec9083ff97483492b9bd5c4245a7 Mon Sep 17 00:00:00 2001 From: Oleg Ovcharuk Date: Tue, 2 Jul 2024 15:08:37 +0300 Subject: [PATCH 1/2] Alter topic docs for python sdk --- ydb/docs/en/core/reference/ydb-sdk/topic.md | 9 ++++++++- ydb/docs/ru/core/reference/ydb-sdk/topic.md | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ydb/docs/en/core/reference/ydb-sdk/topic.md b/ydb/docs/en/core/reference/ydb-sdk/topic.md index 582648547e3d..bcd59db9ca56 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/topic.md +++ b/ydb/docs/en/core/reference/ydb-sdk/topic.md @@ -200,7 +200,14 @@ When you update a topic, you must specify the topic path and the parameters to b - Python - This feature is under development. + Example of updating topic's list of supported codecs and a minimum number of partitions: + + ```python + driver.topic_client.create_topic(topic_path, + set_supported_codecs=[ydb.TopicCodec.RAW, ydb.TopicCodec.GZIP], # optional + set_min_active_partitions=3, # optional + ) + ``` - Java diff --git a/ydb/docs/ru/core/reference/ydb-sdk/topic.md b/ydb/docs/ru/core/reference/ydb-sdk/topic.md index 68da2711348c..e8039d721d5a 100644 --- a/ydb/docs/ru/core/reference/ydb-sdk/topic.md +++ b/ydb/docs/ru/core/reference/ydb-sdk/topic.md @@ -21,7 +21,7 @@ [Примеры на GitHub](https://github.com/ydb-platform/ydb-java-examples/tree/master/ydb-cookbook/src/main/java/tech/ydb/examples/topic) -- {Python} +- Python [Примеры на GitHub](https://github.com/ydb-platform/ydb-python-sdk/tree/main/examples/topic) @@ -206,7 +206,14 @@ - Python - Функциональность находится в разработке. + Пример изменения у топика списка поддерживаемых кодеков и минимального количества партиций + + ```python + driver.topic_client.alter_topic(topic_path, + set_supported_codecs=[ydb.TopicCodec.RAW, ydb.TopicCodec.GZIP], # optional + set_min_active_partitions=3, # optional + ) + ``` - Java From dcbc37b290867d69f90811359ed630d32e9aa620 Mon Sep 17 00:00:00 2001 From: Ivan Blinkov Date: Sun, 14 Jul 2024 18:30:05 -0700 Subject: [PATCH 2/2] Apply suggestions from code review --- ydb/docs/en/core/reference/ydb-sdk/topic.md | 2 +- ydb/docs/ru/core/reference/ydb-sdk/topic.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ydb/docs/en/core/reference/ydb-sdk/topic.md b/ydb/docs/en/core/reference/ydb-sdk/topic.md index bcd59db9ca56..bbaa6d1620cf 100644 --- a/ydb/docs/en/core/reference/ydb-sdk/topic.md +++ b/ydb/docs/en/core/reference/ydb-sdk/topic.md @@ -200,7 +200,7 @@ When you update a topic, you must specify the topic path and the parameters to b - Python - Example of updating topic's list of supported codecs and a minimum number of partitions: + Example of updating a topic's list of supported codecs and minimum number of partitions: ```python driver.topic_client.create_topic(topic_path, diff --git a/ydb/docs/ru/core/reference/ydb-sdk/topic.md b/ydb/docs/ru/core/reference/ydb-sdk/topic.md index e8039d721d5a..af9feb6bfff5 100644 --- a/ydb/docs/ru/core/reference/ydb-sdk/topic.md +++ b/ydb/docs/ru/core/reference/ydb-sdk/topic.md @@ -206,7 +206,7 @@ - Python - Пример изменения у топика списка поддерживаемых кодеков и минимального количества партиций + Пример изменения списка поддерживаемых кодеков и минимального количества партиций у топика ```python driver.topic_client.alter_topic(topic_path,