From 9aa6cfdcd8b66429e5c4815c07d8231c89068886 Mon Sep 17 00:00:00 2001 From: daping Date: Tue, 18 Jun 2024 19:32:07 +0800 Subject: [PATCH] [FLINK-35632] Fix the example provided in the kafkaSource documentation for topic regex subscription --- docs/content.zh/docs/connectors/datastream/kafka.md | 2 +- docs/content/docs/connectors/datastream/kafka.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content.zh/docs/connectors/datastream/kafka.md b/docs/content.zh/docs/connectors/datastream/kafka.md index 9c54aec7d..bb14d6f4b 100644 --- a/docs/content.zh/docs/connectors/datastream/kafka.md +++ b/docs/content.zh/docs/connectors/datastream/kafka.md @@ -110,7 +110,7 @@ Kafka Source 提供了 3 种 Topic / Partition 的订阅方式: {{< tabs "KafkaSource#setTopicPattern" >}} {{< tab "Java" >}} ```java - KafkaSource.builder().setTopicPattern("topic.*"); + KafkaSource.builder().setTopicPattern(Pattern.compile("topic.*")); ``` {{< /tab >}} {{< tab "Python" >}} diff --git a/docs/content/docs/connectors/datastream/kafka.md b/docs/content/docs/connectors/datastream/kafka.md index 0ab35af6a..6b4f8aa3c 100644 --- a/docs/content/docs/connectors/datastream/kafka.md +++ b/docs/content/docs/connectors/datastream/kafka.md @@ -110,7 +110,7 @@ Kafka source provide 3 ways of topic-partition subscription: {{< tabs "KafkaSource#setTopicPattern" >}} {{< tab "Java" >}} ```java - KafkaSource.builder().setTopicPattern("topic.*"); + KafkaSource.builder().setTopicPattern(Pattern.compile("topic.*")); ``` {{< /tab >}} {{< tab "Python" >}}