From 06f6339ddce37ae66590b8c2996b0f8c4d780402 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sat, 25 Jan 2025 10:02:17 +0800 Subject: [PATCH] Fix: Code block labels and highlighting --- .../file_pulsar_clickhouse_example.md | 6 ++-- .../mysql_kafka_clickhouse_example.md | 2 +- .../offline_data_sync/airflow_example.md | 4 +-- .../dolphinscheduler_example.md | 26 +++++++-------- .../offline_data_sync/quartz_example.md | 32 +++++++++++-------- .../mysql_clickhouse_example.md | 2 +- .../mysql_iceberg_example.md | 4 +-- .../mysql_starrocks_example.md | 4 +-- .../pulsar_clickhouse_example.md | 2 +- .../file_pulsar_clickhouse_example.md | 6 ++-- .../mysql_kafka_clickhouse_example.md | 2 +- .../offline_data_sync/airflow_example.md | 4 +-- .../dolphinscheduler_example.md | 26 +++++++-------- .../offline_data_sync/quartz_example.md | 24 +++++++------- .../mysql_clickhouse_example.md | 2 +- .../mysql_iceberg_example.md | 4 +-- .../mysql_starrocks_example.md | 4 +-- .../pulsar_clickhouse_example.md | 2 +- 18 files changed, 80 insertions(+), 76 deletions(-) diff --git a/docs/quick_start/data_ingestion/file_pulsar_clickhouse_example.md b/docs/quick_start/data_ingestion/file_pulsar_clickhouse_example.md index 98ecd52be7d..768020bf01f 100644 --- a/docs/quick_start/data_ingestion/file_pulsar_clickhouse_example.md +++ b/docs/quick_start/data_ingestion/file_pulsar_clickhouse_example.md @@ -19,7 +19,7 @@ docker run -d --rm --net=host --name clickhouse -e CLICKHOUSE_USER=admin -e CLIC ## Cluster Initialize When all containers are successfully started, you can access the InLong dashboard address http://localhost, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` @@ -76,12 +76,12 @@ Back to [Ingestion] page, wait for [configuration success]. ## Test Data ### Enter Agent Container -``` +```shell docker exec -it agent /bin/bash ``` ### Send Data -``` +```shell # collect file /data/collect-data/test.log data source configuration path and total of 10000 data packets are sent. for i in {1..10000};do echo "name_$i | $i" >> /data/collect-data/test.log;done ``` diff --git a/docs/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md b/docs/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md index 2433302e9a8..1772931d2a9 100644 --- a/docs/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md +++ b/docs/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md @@ -27,7 +27,7 @@ docker run -d --name kafka -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_ ## Cluster Initialize When all containers are successfully started, you can access the InLong dashboard address http://localhost, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` diff --git a/docs/quick_start/offline_data_sync/airflow_example.md b/docs/quick_start/offline_data_sync/airflow_example.md index 7be4d8aba79..497d0cef538 100644 --- a/docs/quick_start/offline_data_sync/airflow_example.md +++ b/docs/quick_start/offline_data_sync/airflow_example.md @@ -19,7 +19,7 @@ Download the [connectors](https://inlong.apache.org/downloads/) corresponding to ## Create Clusters And Data Target When all containers are successfully started, you can access the InLong dashboard address `http://localhost`, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` @@ -37,7 +37,7 @@ Password: inlong Execute the following SQL statement: -```mysql +```sql CREATE TABLE sink_table ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, diff --git a/docs/quick_start/offline_data_sync/dolphinscheduler_example.md b/docs/quick_start/offline_data_sync/dolphinscheduler_example.md index 40a04438936..9e75be0b640 100644 --- a/docs/quick_start/offline_data_sync/dolphinscheduler_example.md +++ b/docs/quick_start/offline_data_sync/dolphinscheduler_example.md @@ -22,7 +22,7 @@ Download the [connectors](https://inlong.apache.org/downloads/) corresponding to ## Create Clusters And Data Target When all containers are successfully started, you can access the InLong dashboard address `http://localhost`, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` @@ -40,7 +40,7 @@ Password: inlong Execute the following SQL statement: -```mysql +```sql CREATE TABLE sink_table ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, @@ -112,17 +112,17 @@ View the DolphinScheduler task instance logs. The following logs indicate that t Use the Pulsar SDK to produce data into the Pulsar topic. An example is as follows: ```java - // Create Pulsar client and producer - PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); - Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); - - // Send messages - for (int i = 0; i < 10000; i++) { - // Field separator is | - String msgStr = i + "|msg-" + i; - MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); - System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); - } +// Create Pulsar client and producer +PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); +Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); + +// Send messages +for (int i = 0; i < 10000; i++) { + // Field separator is | + String msgStr = i + "|msg-" + i; + MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); + System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); +} ``` ### Data Validation diff --git a/docs/quick_start/offline_data_sync/quartz_example.md b/docs/quick_start/offline_data_sync/quartz_example.md index 0a392178270..c80c8f31c6b 100644 --- a/docs/quick_start/offline_data_sync/quartz_example.md +++ b/docs/quick_start/offline_data_sync/quartz_example.md @@ -19,7 +19,7 @@ Download the [connectors](https://inlong.apache.org/downloads/) corresponding to ## Cluster Initialize When all containers are successfully started, you can access the InLong dashboard address `http://localhost`, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` @@ -29,13 +29,17 @@ Click [Clusters] -> [ClusterTags] -> [Create] on the page to specify the cluster ![Create Cluster Tag](img/pulsar_mysql/quartz/cluster_tag.png) -**caution: `default_cluster` is the default ClusterTags for each component. If you decide to use a different name, make sure to update the corresponding tag configuration accordingly.** +:::caution +`default_cluster` is the default ClusterTags for each component. If you decide to use a different name, make sure to update the corresponding tag configuration accordingly. +::: ### Register Pulsar Cluster ![Create Pulsar](img/pulsar_mysql/quartz/create_pulsar_cluster.png) -**You can refer to the screenshot information to fill in details such as cluster name, associated tag, and Pulsar cluster address.** +:::info +You can refer to the screenshot information to fill in details such as cluster name, associated tag, and Pulsar cluster address. +::: ## Task Creation ### Create Data Stream Group @@ -115,17 +119,17 @@ Return to the [Synchronization] page and wait for the task configuration to succ Use the Pulsar SDK to produce data into the Pulsar topic. An example is as follows: ```java - // Create Pulsar client and producer - PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); - Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); - - // Send messages - for (int i = 0; i < 10000; i++) { - // Field separator is | - String msgStr = i + "|msg-" + i; - MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); - System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); - } +// Create Pulsar client and producer +PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); +Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); + +// Send messages +for (int i = 0; i < 10000; i++) { + // Field separator is | + String msgStr = i + "|msg-" + i; + MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); + System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); +} ``` ### Data Validation diff --git a/docs/quick_start/realtime_data_sync/mysql_clickhouse_example.md b/docs/quick_start/realtime_data_sync/mysql_clickhouse_example.md index 903cabfe62e..90186fd0913 100644 --- a/docs/quick_start/realtime_data_sync/mysql_clickhouse_example.md +++ b/docs/quick_start/realtime_data_sync/mysql_clickhouse_example.md @@ -23,7 +23,7 @@ docker run -d --rm --net=host --name clickhouse -e CLICKHOUSE_USER=admin -e CLIC ## Cluster Initialize When all containers are successfully started, you can access the InLong dashboard address http://localhost, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` diff --git a/docs/quick_start/realtime_data_sync/mysql_iceberg_example.md b/docs/quick_start/realtime_data_sync/mysql_iceberg_example.md index 5544428c98a..00780660345 100644 --- a/docs/quick_start/realtime_data_sync/mysql_iceberg_example.md +++ b/docs/quick_start/realtime_data_sync/mysql_iceberg_example.md @@ -20,7 +20,7 @@ Please refer to the [Installation Tutorial](https://iceberg.apache.org/hive-quic ## Cluster Initialize When all containers are successfully started, you can access the InLong dashboard address http://localhost, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` @@ -67,7 +67,7 @@ Back to [Synchronization] page, wait for [success]. ## Test Data ### Send Data -``` +```bash #!/bin/bash # MySQL info diff --git a/docs/quick_start/realtime_data_sync/mysql_starrocks_example.md b/docs/quick_start/realtime_data_sync/mysql_starrocks_example.md index 83d968fce63..59fdf234ae8 100644 --- a/docs/quick_start/realtime_data_sync/mysql_starrocks_example.md +++ b/docs/quick_start/realtime_data_sync/mysql_starrocks_example.md @@ -21,7 +21,7 @@ Please refer to the [Installation Tutorial](https://docs.starrocks.io/docs/quick ## Cluster Initialize When all containers are successfully started, you can access the InLong dashboard address http://localhost, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` @@ -64,7 +64,7 @@ Back to [Synchronization] page, wait for [success]. ## Test Data ### Send Data -``` +```bash #!/bin/bash # MySQL info diff --git a/docs/quick_start/realtime_data_sync/pulsar_clickhouse_example.md b/docs/quick_start/realtime_data_sync/pulsar_clickhouse_example.md index a879040cfcc..a91c57912eb 100644 --- a/docs/quick_start/realtime_data_sync/pulsar_clickhouse_example.md +++ b/docs/quick_start/realtime_data_sync/pulsar_clickhouse_example.md @@ -23,7 +23,7 @@ docker run -d --rm --net=host --name clickhouse -e CLICKHOUSE_USER=admin -e CLIC ## Cluster Initialize When all containers are successfully started, you can access the InLong dashboard address http://localhost, and use the following default account to log in. -``` +```properties User: admin Password: inlong ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/file_pulsar_clickhouse_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/file_pulsar_clickhouse_example.md index 936b1165093..472f38199cd 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/file_pulsar_clickhouse_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/file_pulsar_clickhouse_example.md @@ -18,7 +18,7 @@ docker run -d --rm --net=host --name clickhouse -e CLICKHOUSE_USER=admin -e CLIC ## 集群初始化 容器启动成功后,访问 InLong Dashboard 地址 http://localhost,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` @@ -73,12 +73,12 @@ Service URL 为 `pulsar://pulsar:6650`,Admin URL 为 `http://pulsar:8080`。 ## 测试数据 ### 进入 Agent 容器 -``` +```shell docker exec -it agent /bin/bash ``` ### 发送数据 -``` +```shell # 采集文件 /data/collect-data/test.log 数据源配置路径,总共发送 10000 条 for i in {1..10000};do echo "name_$i | $i" >> /data/collect-data/test.log;done ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md index adee256d0db..52ddc640f62 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_ingestion/mysql_kafka_clickhouse_example.md @@ -26,7 +26,7 @@ docker run -d --name kafka -p 9092:9092 -e KAFKA_BROKER_ID=0 -e KAFKA_ZOOKEEPER_ ## 集群初始化 容器启动成功后,访问 InLong Dashboard 地址 http://localhost,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/airflow_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/airflow_example.md index 5ecd4646343..a808337247a 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/airflow_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/airflow_example.md @@ -19,7 +19,7 @@ sidebar_position: 3 ## 创建集群和数据目标 InLong 服务启动后,可以访问 InLong Dashboard 地址 `http://localhost`,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` @@ -36,7 +36,7 @@ Password: inlong 执行如下 Sql 语句: -```mysql +```sql CREATE TABLE sink_table ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/dolphinscheduler_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/dolphinscheduler_example.md index 2375d8dcf75..c115464ce45 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/dolphinscheduler_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/dolphinscheduler_example.md @@ -21,7 +21,7 @@ sidebar_position: 2 ## 创建集群和数据目标 InLong 服务启动后,可以访问 InLong Dashboard 地址 `http://localhost`,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` @@ -38,7 +38,7 @@ Password: inlong 执行如下 Sql 语句: -```mysql +```sql CREATE TABLE sink_table ( id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, @@ -111,17 +111,17 @@ CREATE TABLE sink_table ( 通过 Pulsar SDK 生产数据写入的 Pulsar topic 中,示例如下: ```java - // Create Pulsar client and producer - PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); - Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); - - // Send messages - for (int i = 0; i < 10000; i++) { - // Field separator is | - String msgStr = i + "|msg-" + i; - MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); - System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); - } +// 创建 pulsar client 和 producer +PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); +Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); + +// 发送消息 +for (int i = 0; i < 10000; i++) { + // 字段分隔符为 | + String msgStr = i + "|msg-" + i; + MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); + System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); +} ``` ### 数据验证 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/quartz_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/quartz_example.md index 3fcc926a6a8..5c1e565bd04 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/quartz_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/offline_data_sync/quartz_example.md @@ -19,7 +19,7 @@ sidebar_position: 1 ## 集群初始化 InLong 服务启动后,可以访问 InLong Dashboard 地址 `http://localhost`,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` @@ -113,17 +113,17 @@ CREATE TABLE sink_table ( 通过 Pulsar SDK 生产数据写入的 Pulsar topic 中,示例如下: ```java - // 创建 pulsar client 和 producer - PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); - Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); - - // 发送消息 - for (int i = 0; i < 10000; i++) { - // 字段分隔符为 | - String msgStr = i + "|msg-" + i; - MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); - System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); - } +// 创建 pulsar client 和 producer +PulsarClient pulsarClient = PulsarClient.builder().serviceUrl("pulsar://localhost:6650").build(); +Producer producer = pulsarClient.newProducer().topic("public/default/test").create(); + +// 发送消息 +for (int i = 0; i < 10000; i++) { + // 字段分隔符为 | + String msgStr = i + "|msg-" + i; + MessageId msgId = producer.send(msgStr.getBytes(StandardCharsets.UTF_8)); + System.out.println("Send msg : " + msgStr + " with msgId: " + msgId); +} ``` ### 数据验证 diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_clickhouse_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_clickhouse_example.md index 08e0c3b5a28..3fc93a3990f 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_clickhouse_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_clickhouse_example.md @@ -23,7 +23,7 @@ docker run -d --rm --net=host --name clickhouse -e CLICKHOUSE_USER=admin -e CLIC ## 集群初始化 当所有容器都成功启动后,可以访问 InLong Dashboard 地址 http://localhost,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_iceberg_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_iceberg_example.md index 1c80e65338c..bb4baa44564 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_iceberg_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_iceberg_example.md @@ -20,7 +20,7 @@ sidebar_position: 3 ## 集群初始化 容器启动成功后,访问 InLong Dashboard 地址 http://localhost,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` @@ -67,7 +67,7 @@ Password: inlong ## 测试数据 ### 发送数据 -``` +```bash #!/bin/bash # MySQL info diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_starrocks_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_starrocks_example.md index 665c7923578..c998d786004 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_starrocks_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/mysql_starrocks_example.md @@ -21,7 +21,7 @@ sidebar_position: 2 ## 集群初始化 容器启动成功后,访问 InLong Dashboard 地址 http://localhost,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ``` @@ -61,7 +61,7 @@ Password: inlong ## 测试数据 ### 发送数据 -``` +```shell #!/bin/bash # MySQL info diff --git a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/pulsar_clickhouse_example.md b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/pulsar_clickhouse_example.md index 9bb36ab1815..3dc5d778007 100644 --- a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/pulsar_clickhouse_example.md +++ b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/realtime_data_sync/pulsar_clickhouse_example.md @@ -23,7 +23,7 @@ docker run -d --rm --net=host --name clickhouse -e CLICKHOUSE_USER=admin -e CLIC ## 集群初始化 当所有容器都成功启动后,可以访问 InLong Dashboard 地址 http://localhost,并使用以下默认账号登录: -``` +```properties User: admin Password: inlong ```