This is an automated email from the ASF dual-hosted git repository.
gaojun2048 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 3e186a6ed [Examples]remove unexpected examples (#2880)
3e186a6ed is described below
commit 3e186a6edd498ac32b3f4f43e18b44fc3a7b7671
Author: Eric <[email protected]>
AuthorDate: Mon Sep 26 10:57:41 2022 +0800
[Examples]remove unexpected examples (#2880)
* remove unexpected examples
* clean pom
---
.../seatunnel-flink-connector-v2-example/pom.xml | 25 ---
.../example/flink/v2/FakeToLocalFileExample.java | 51 -----
.../example/flink/v2/HttpConnectorExample.java | 210 ---------------------
.../flink/v2/SeaTunnelDingTalkApiExample.java | 51 -----
.../main/resources/examples/fake_to_dingtalk.conf | 62 ------
.../resources/examples/fakesource_to_file.conf | 73 -------
.../resources/examples/http_source_to_sink.conf | 66 -------
.../seatunnel-spark-connector-v2-example/pom.xml | 5 -
.../spark/v2/SeaTunnelApiToClickHouseExample.java | 30 ---
.../resources/examples/spark.batch.clickhouse.conf | 59 ------
10 files changed, 632 deletions(-)
diff --git a/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
b/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
index 8ea60e9c3..8cadae625 100644
--- a/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
+++ b/seatunnel-examples/seatunnel-flink-connector-v2-example/pom.xml
@@ -57,31 +57,6 @@
<artifactId>connector-console</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.seatunnel</groupId>
- <artifactId>connector-file-local</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.seatunnel</groupId>
- <artifactId>connector-file-ftp</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.seatunnel</groupId>
- <artifactId>connector-socket</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.seatunnel</groupId>
- <artifactId>connector-dingtalk</artifactId>
- <version>${project.version}</version>
- </dependency>
- <dependency>
- <groupId>org.apache.seatunnel</groupId>
- <artifactId>connector-http-base</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- seatunnel connectors -->
<!--flink-->
<dependency>
diff --git
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/FakeToLocalFileExample.java
b/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/FakeToLocalFileExample.java
deleted file mode 100644
index fc15ff44b..000000000
---
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/FakeToLocalFileExample.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.seatunnel.example.flink.v2;
-
-import org.apache.seatunnel.core.starter.Seatunnel;
-import org.apache.seatunnel.core.starter.command.Command;
-import org.apache.seatunnel.core.starter.exception.CommandException;
-import org.apache.seatunnel.core.starter.flink.args.FlinkCommandArgs;
-import org.apache.seatunnel.core.starter.flink.command.FlinkCommandBuilder;
-
-import java.io.FileNotFoundException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.nio.file.Paths;
-
-public class FakeToLocalFileExample {
-
- public static void main(String[] args) throws FileNotFoundException,
URISyntaxException, CommandException {
- String configFile =
getTestConfigFile("/examples/fakesource_to_file.conf");
- FlinkCommandArgs flinkCommandArgs = new FlinkCommandArgs();
- flinkCommandArgs.setConfigFile(configFile);
- flinkCommandArgs.setCheckConfig(false);
- flinkCommandArgs.setVariables(null);
- Command<FlinkCommandArgs> flinkCommand =
- new FlinkCommandBuilder().buildCommand(flinkCommandArgs);
- Seatunnel.run(flinkCommand);
- }
-
- public static String getTestConfigFile(String configFile) throws
FileNotFoundException, URISyntaxException {
- URL resource = FakeToLocalFileExample.class.getResource(configFile);
- if (resource == null) {
- throw new FileNotFoundException("Can't find config file: " +
configFile);
- }
- return Paths.get(resource.toURI()).toString();
- }
-}
diff --git
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/HttpConnectorExample.java
b/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/HttpConnectorExample.java
deleted file mode 100644
index 9617031bb..000000000
---
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/HttpConnectorExample.java
+++ /dev/null
@@ -1,210 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.seatunnel.example.flink.v2;
-
-import static com.google.common.base.Preconditions.checkArgument;
-
-import org.apache.seatunnel.api.table.type.ArrayType;
-import org.apache.seatunnel.api.table.type.BasicType;
-import org.apache.seatunnel.api.table.type.DecimalType;
-import org.apache.seatunnel.api.table.type.LocalTimeType;
-import org.apache.seatunnel.api.table.type.MapType;
-import org.apache.seatunnel.api.table.type.PrimitiveByteArrayType;
-import org.apache.seatunnel.api.table.type.SeaTunnelDataType;
-import org.apache.seatunnel.api.table.type.SeaTunnelRow;
-import org.apache.seatunnel.api.table.type.SeaTunnelRowType;
-import org.apache.seatunnel.core.starter.Seatunnel;
-import org.apache.seatunnel.core.starter.command.Command;
-import org.apache.seatunnel.core.starter.flink.args.FlinkCommandArgs;
-import org.apache.seatunnel.core.starter.flink.command.FlinkCommandBuilder;
-import org.apache.seatunnel.format.json.JsonDeserializationSchema;
-import org.apache.seatunnel.format.json.JsonSerializationSchema;
-
-import com.fasterxml.jackson.databind.JsonNode;
-import com.fasterxml.jackson.databind.node.ArrayNode;
-import lombok.extern.slf4j.Slf4j;
-import okhttp3.mockwebserver.Dispatcher;
-import okhttp3.mockwebserver.MockResponse;
-import okhttp3.mockwebserver.MockWebServer;
-import okhttp3.mockwebserver.RecordedRequest;
-
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.math.BigDecimal;
-import java.net.InetAddress;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.nio.file.Paths;
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-import java.util.concurrent.BlockingQueue;
-import java.util.concurrent.LinkedBlockingQueue;
-
-@Slf4j
-public class HttpConnectorExample {
-
- private static final SeaTunnelRowType ROW_TYPE = new SeaTunnelRowType(
- new String[]{
- "id",
- "c_map",
- "c_array",
- "c_string",
- "c_boolean",
- "c_tinyint",
- "c_smallint",
- "c_int",
- "c_bigint",
- "c_float",
- "c_double",
- "c_decimal",
- "c_bytes",
- "c_date",
- "c_timestamp"
- },
- new SeaTunnelDataType[]{
- BasicType.LONG_TYPE,
- new MapType(BasicType.STRING_TYPE, BasicType.SHORT_TYPE),
- ArrayType.BYTE_ARRAY_TYPE,
- BasicType.STRING_TYPE,
- BasicType.BOOLEAN_TYPE,
- BasicType.BYTE_TYPE,
- BasicType.SHORT_TYPE,
- BasicType.INT_TYPE,
- BasicType.LONG_TYPE,
- BasicType.FLOAT_TYPE,
- BasicType.DOUBLE_TYPE,
- new DecimalType(2, 1),
- PrimitiveByteArrayType.INSTANCE,
- LocalTimeType.LOCAL_DATE_TYPE,
- LocalTimeType.LOCAL_DATE_TIME_TYPE
- });
- private static final List<SeaTunnelRow> TEST_DATASET =
generateTestDataset();
- private static final JsonSerializationSchema SERIALIZATION_SCHEMA = new
JsonSerializationSchema(ROW_TYPE);
- private static final JsonDeserializationSchema DESERIALIZATION_SCHEMA =
new JsonDeserializationSchema(
- false, false, ROW_TYPE);
- private static final int MOCK_WEB_SERVER_PORT = 18888;
-
- public static void main(String[] args) throws Exception {
- BlockingQueue<String> readDataQueue = new LinkedBlockingQueue<>();
- BlockingQueue<String> writeDataQueue = new LinkedBlockingQueue<>();
-
- String configFile = "/examples/http_source_to_sink.conf";
- try (MockWebServer mockWebServer =
startWebServer(MOCK_WEB_SERVER_PORT, readDataQueue, writeDataQueue)) {
- log.info("Submitting http job: {}", configFile);
- readDataQueue.offer(toJson(TEST_DATASET));
- submitHttpJob(configFile);
- log.info("Submitted http job: {}", configFile);
-
- log.info("Validate http sink data...");
- checkArgument(writeDataQueue.size() == TEST_DATASET.size());
- List<SeaTunnelRow> results = new ArrayList<>();
- for (int i = 0; i < TEST_DATASET.size(); i++) {
- SeaTunnelRow row =
DESERIALIZATION_SCHEMA.deserialize(writeDataQueue.take().getBytes());
- results.add(row);
- }
- checkArgument(results.equals(TEST_DATASET));
- }
- }
-
- private static void submitHttpJob(String configurePath) throws Exception {
- String configFile = getTestConfigFile(configurePath);
- FlinkCommandArgs flinkCommandArgs = new FlinkCommandArgs();
- flinkCommandArgs.setConfigFile(configFile);
- flinkCommandArgs.setCheckConfig(false);
- flinkCommandArgs.setVariables(null);
- Command<FlinkCommandArgs> flinkCommand =
- new FlinkCommandBuilder().buildCommand(flinkCommandArgs);
- Seatunnel.run(flinkCommand);
- }
-
- private static String getTestConfigFile(String configFile) throws
FileNotFoundException, URISyntaxException {
- URL resource = HttpConnectorExample.class.getResource(configFile);
- if (resource == null) {
- throw new FileNotFoundException("Can't find config file: " +
configFile);
- }
- return Paths.get(resource.toURI()).toString();
- }
-
- private static MockWebServer startWebServer(int port,
- BlockingQueue<String>
readDataQueue,
- BlockingQueue<String>
writeDataQueue) throws Exception {
- MockWebServer mockWebServer = new MockWebServer();
- mockWebServer.start(InetAddress.getByName("localhost"), port);
- mockWebServer.setDispatcher(new Dispatcher() {
- @Override
- public MockResponse dispatch(RecordedRequest request) throws
InterruptedException {
- log.info("received request : {}", request.getPath());
- if (request.getPath().endsWith("/read")) {
- if (readDataQueue.isEmpty()) {
- return new MockResponse();
- }
- String readData = readDataQueue.take();
- log.info("Take readDataQueue, remaining capacity: {}",
readDataQueue.size());
- return new MockResponse().setBody(readData);
- }
- if (request.getPath().endsWith("/write")) {
- writeDataQueue.offer(request.getUtf8Body());
- log.info("Offer writeDataQueue, remaining capacity: {}",
writeDataQueue.size());
- return new MockResponse().setBody("write request");
- }
- return new MockResponse();
- }
- });
- log.info("Started MockWebServer: {}", mockWebServer.url("/"));
- return mockWebServer;
- }
-
- @SuppressWarnings("MagicNumber")
- private static List<SeaTunnelRow> generateTestDataset() {
- List<SeaTunnelRow> rows = new ArrayList<>();
- for (int i = 0; i < 100; i++) {
- SeaTunnelRow row = new SeaTunnelRow(new Object[]{
- Long.valueOf(i),
- Collections.singletonMap("key", Short.parseShort("1")),
- new Byte[]{Byte.parseByte("1")},
- "string",
- Boolean.FALSE,
- Byte.parseByte("1"),
- Short.parseShort("1"),
- Integer.parseInt("1"),
- Long.parseLong("1"),
- Float.parseFloat("1.1"),
- Double.parseDouble("1.1"),
- BigDecimal.valueOf(11, 1),
- "test".getBytes(),
- LocalDate.now(),
- LocalDateTime.now()
- });
- rows.add(row);
- }
- return rows;
- }
-
- private static String toJson(List<SeaTunnelRow> rows) throws IOException {
- ArrayNode arrayNode =
SERIALIZATION_SCHEMA.getMapper().createArrayNode();
- for (SeaTunnelRow row : rows) {
- byte[] jsonBytes = SERIALIZATION_SCHEMA.serialize(row);
- JsonNode jsonNode =
SERIALIZATION_SCHEMA.getMapper().readTree(jsonBytes);
- arrayNode.add(jsonNode);
- }
- return SERIALIZATION_SCHEMA.getMapper().writeValueAsString(arrayNode);
- }
-}
diff --git
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/SeaTunnelDingTalkApiExample.java
b/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/SeaTunnelDingTalkApiExample.java
deleted file mode 100644
index d72d70b2a..000000000
---
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/java/org/apache/seatunnel/example/flink/v2/SeaTunnelDingTalkApiExample.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.seatunnel.example.flink.v2;
-
-import org.apache.seatunnel.core.starter.Seatunnel;
-import org.apache.seatunnel.core.starter.command.Command;
-import org.apache.seatunnel.core.starter.exception.CommandException;
-import org.apache.seatunnel.core.starter.flink.args.FlinkCommandArgs;
-import org.apache.seatunnel.core.starter.flink.command.FlinkCommandBuilder;
-
-import java.io.FileNotFoundException;
-import java.net.URISyntaxException;
-import java.net.URL;
-import java.nio.file.Paths;
-
-public class SeaTunnelDingTalkApiExample {
-
- public static void main(String[] args) throws FileNotFoundException,
URISyntaxException, CommandException {
- String configFile =
getTestConfigFile("/examples/fake_to_dingtalk.conf");
- FlinkCommandArgs flinkCommandArgs = new FlinkCommandArgs();
- flinkCommandArgs.setConfigFile(configFile);
- flinkCommandArgs.setCheckConfig(false);
- flinkCommandArgs.setVariables(null);
- Command<FlinkCommandArgs> flinkCommand =
- new FlinkCommandBuilder().buildCommand(flinkCommandArgs);
- Seatunnel.run(flinkCommand);
- }
-
- public static String getTestConfigFile(String configFile) throws
FileNotFoundException, URISyntaxException {
- URL resource =
SeaTunnelDingTalkApiExample.class.getResource(configFile);
- if (resource == null) {
- throw new FileNotFoundException("Can't find config file: " +
configFile);
- }
- return Paths.get(resource.toURI()).toString();
- }
-}
diff --git
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_dingtalk.conf
b/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_dingtalk.conf
deleted file mode 100644
index d681985d0..000000000
---
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fake_to_dingtalk.conf
+++ /dev/null
@@ -1,62 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-######
-###### This config file is a demonstration of streaming processing in
seatunnel config
-######
-
-env {
- # You can set flink configuration here
- execution.parallelism = 1
- #job.mode = "BATCH"
- #execution.checkpoint.interval = 10000
- #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
-}
-
-source {
- # This is a example source plugin **only for test and demonstrate the
feature source plugin**
- FakeSource {
- result_table_name = "fake"
- schema = {
- fields {
- name = "string"
- age = "int"
- }
- }
- }
-
- # If you would like to get more information about how to configure seatunnel
and see full list of source plugins,
- # please go to https://seatunnel.apache.org/docs/category/source-v2
-}
-
-transform {
- sql {
- sql = "select name,age from fake"
- }
-
- # If you would like to get more information about how to configure seatunnel
and see full list of transform plugins,
- # please go to https://seatunnel.apache.org/docs/category/transform
-}
-
-sink {
- DingTalk {
-
url="https://oapi.dingtalk.com/robot/send?access_token=ec646cccd028d978a7156ceeac5b625ebd94f586ea0743fa501c100007890"
- secret="SEC093249eef7aa57d4388aa635f678930c63db3d28b2829d5b2903fc1e5c10000"
- }
-
- # If you would like to get more information about how to configure seatunnel
and see full list of sink plugins,
- # please go to https://seatunnel.apache.org/docs/category/sink-v2
-}
\ No newline at end of file
diff --git
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fakesource_to_file.conf
b/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fakesource_to_file.conf
deleted file mode 100644
index d640281cc..000000000
---
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/fakesource_to_file.conf
+++ /dev/null
@@ -1,73 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-######
-###### This config file is a demonstration of streaming processing in
seatunnel config
-######
-
-env {
- # You can set flink configuration here
- execution.parallelism = 1
- job.mode = "BATCH"
- execution.checkpoint.interval = 10
- #execution.checkpoint.data-uri = "hdfs://localhost:9000/checkpoint"
-}
-
-source {
- # This is a example source plugin **only for test and demonstrate the
feature source plugin**
- FakeSource {
- result_table_name = "fake"
- schema = {
- fields {
- name = "string"
- age = "int"
- }
- }
- }
-
- # If you would like to get more information about how to configure seatunnel
and see full list of source plugins,
- # please go to https://seatunnel.apache.org/docs/category/source-v2
-}
-
-transform {
-
- sql {
- sql = "select name,age from fake"
- }
- # If you would like to get more information about how to configure seatunnel
and see full list of transform plugins,
- # please go to https://seatunnel.apache.org/docs/category/transform
-}
-
-sink {
- LocalFile {
- path="file:///tmp/hive/warehouse/test2"
- field_delimiter="\t"
- row_delimiter="\n"
- partition_by=["age"]
- partition_dir_expression="${k0}=${v0}"
- is_partition_field_write_in_file=true
- file_name_expression="${transactionId}_${now}"
- file_format="text"
- sink_columns=["name","age"]
- filename_time_format="yyyy.MM.dd"
- is_enable_transaction=true
- save_mode="error"
-
- }
-
- # If you would like to get more information about how to configure seatunnel
and see full list of sink plugins,
- # please go to https://seatunnel.apache.org/docs/category/sink-v2
-}
\ No newline at end of file
diff --git
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/http_source_to_sink.conf
b/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/http_source_to_sink.conf
deleted file mode 100644
index 837884bbf..000000000
---
a/seatunnel-examples/seatunnel-flink-connector-v2-example/src/main/resources/examples/http_source_to_sink.conf
+++ /dev/null
@@ -1,66 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-######
-###### This config file is a demonstration of streaming processing in
seatunnel config
-######
-
-env {
- execution.parallelism = 1
- job.mode = "BATCH"
-}
-
-source {
- Http {
- url = "http://localhost:18888/read"
- poll_interval_ms = 1000
- retry = 1
- retry_backoff_multiplier_ms = 100
- retry_backoff_max_ms = 1000
- schema = {
- fields {
- id = bigint
- c_map = "map<string, smallint>"
- c_array = "array<tinyint>"
- c_string = string
- c_boolean = boolean
- c_tinyint = tinyint
- c_smallint = smallint
- c_int = int
- c_bigint = bigint
- c_float = float
- c_double = double
- c_decimal = "decimal(2, 1)"
- c_bytes = bytes
- c_date = date
- c_timestamp = timestamp
- }
- }
- }
-}
-
-transform {
-}
-
-sink {
- Console {}
- Http {
- url = "http://localhost:18888/write"
- retry = 1
- retry_backoff_multiplier_ms = 100
- retry_backoff_max_ms = 1000
- }
-}
\ No newline at end of file
diff --git a/seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml
b/seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml
index abb515daf..23f22f062 100644
--- a/seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml
+++ b/seatunnel-examples/seatunnel-spark-connector-v2-example/pom.xml
@@ -57,11 +57,6 @@
<artifactId>connector-console</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.seatunnel</groupId>
- <artifactId>connector-clickhouse</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- seatunnel connectors -->
<!--spark-->
diff --git
a/seatunnel-examples/seatunnel-spark-connector-v2-example/src/main/java/org/apache/seatunnel/example/spark/v2/SeaTunnelApiToClickHouseExample.java
b/seatunnel-examples/seatunnel-spark-connector-v2-example/src/main/java/org/apache/seatunnel/example/spark/v2/SeaTunnelApiToClickHouseExample.java
deleted file mode 100644
index b078c30aa..000000000
---
a/seatunnel-examples/seatunnel-spark-connector-v2-example/src/main/java/org/apache/seatunnel/example/spark/v2/SeaTunnelApiToClickHouseExample.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.seatunnel.example.spark.v2;
-
-import org.apache.seatunnel.core.starter.exception.CommandException;
-
-import java.io.FileNotFoundException;
-import java.net.URISyntaxException;
-
-public class SeaTunnelApiToClickHouseExample {
-
- public static void main(String[] args) throws FileNotFoundException,
URISyntaxException, CommandException {
- ExampleUtils.builder("/examples/spark.batch.clickhouse.conf");
- }
-}
diff --git
a/seatunnel-examples/seatunnel-spark-connector-v2-example/src/main/resources/examples/spark.batch.clickhouse.conf
b/seatunnel-examples/seatunnel-spark-connector-v2-example/src/main/resources/examples/spark.batch.clickhouse.conf
deleted file mode 100644
index 8d57e1f3b..000000000
---
a/seatunnel-examples/seatunnel-spark-connector-v2-example/src/main/resources/examples/spark.batch.clickhouse.conf
+++ /dev/null
@@ -1,59 +0,0 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-
-env {
- spark.app.name = "SeaTunnelToClickHouseV2"
- spark.executor.instances = 2
- spark.executor.cores = 1
- spark.executor.memory = "1g"
- spark.master = local
-}
-
-source {
- FakeSource {
- result_table_name = "fake"
- schema = {
- fields {
- name = "string"
- age = "int"
- }
- }
- }
- # If you would like to get more information about how to configure seatunnel
and see full list of input plugins,
- # please go to https://seatunnel.apache.org/docs/category/source-v2
-}
-
-
-transform {
- sql {
- sql = "select name,age from fake"
- result_table_name = "sql"
- }
-}
-
-sink {
- ClickHouse {
- host = "139.198.158.103:8123"
- database = "default"
- table = "test_clickhouse_table_v2"
- fields = ["name", "age"]
- username = 'default'
- bulk_size = 20000
- retry_codes = [209, 210]
- retry = 3
- }
-}