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/seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new 407331c6e0 [Feature][doc][Connector-V2][Socket] Add Socket connector
doc #5255 (#5287)
407331c6e0 is described below
commit 407331c6e0d7cf5703c6926662a2351456a1ae34
Author: ZhilinLi <[email protected]>
AuthorDate: Tue Nov 7 13:38:17 2023 +0800
[Feature][doc][Connector-V2][Socket] Add Socket connector doc #5255 (#5287)
---
docs/en/connector-v2/sink/Socket.md | 76 +++++++++++++----------------------
docs/en/connector-v2/source/Socket.md | 60 +++++++++++----------------
2 files changed, 50 insertions(+), 86 deletions(-)
diff --git a/docs/en/connector-v2/sink/Socket.md
b/docs/en/connector-v2/sink/Socket.md
index bb5ac612cc..8d932dcfbd 100644
--- a/docs/en/connector-v2/sink/Socket.md
+++ b/docs/en/connector-v2/sink/Socket.md
@@ -2,55 +2,34 @@
> Socket sink connector
-## Description
+## Support Those Engines
-Used to send data to Socket Server. Both support streaming and batch mode.
-
-> For example, if the data from upstream is [`age: 12, name: jared`], the
content send to socket server is the following: `{"name":"jared","age":17}`
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
## Key features
- [ ] [exactly-once](../../concept/connector-v2-features.md)
-## Options
-
-| name | type | required | default value |
-|----------------|---------|----------|---------------|
-| host | String | Yes | |
-| port | Integer | yes | |
-| max_retries | Integer | No | 3 |
-| common-options | | no | - |
-
-### host [string]
-
-socket server host
-
-### port [integer]
-
-socket server port
-
-### max_retries [integer]
-
-The number of retries to send record failed
-
-### common options
+## Description
-Sink plugin common parameters, please refer to [Sink Common
Options](common-options.md) for details
+Used to send data to Socket Server. Both support streaming and batch mode.
-## Example
+> For example, if the data from upstream is [`age: 12, name: jared`], the
content send to socket server is the following: `{"name":"jared","age":17}`
-simple:
+## Sink Options
-```hocon
-Socket {
- host = "localhost"
- port = 9999
- }
-```
+| Name | Type | Required | Default |
Description |
+|----------------|---------|----------|---------|---------------------------------------------------------------------------------------------------------|
+| host | String | Yes | | socket server host
|
+| port | Integer | Yes | | socket server port
|
+| max_retries | Integer | No | 3 | The number of retries to
send record failed |
+| common-options | | No | - | Source plugin common
parameters, please refer to [Source Common Options](common-options.md) for
details |
-test:
+## Task Example
-* Configuring the SeaTunnel config file
+> This is randomly generated data written to the Socket side
```hocon
env {
@@ -59,24 +38,23 @@ env {
}
source {
- FakeSource {
- result_table_name = "fake"
- schema = {
- fields {
- name = "string"
- age = "int"
- }
+ FakeSource {
+ result_table_name = "fake"
+ schema = {
+ fields {
+ name = "string"
+ age = "int"
}
}
+ }
}
sink {
- Socket {
- host = "localhost"
- port = 9999
- }
+ Socket {
+ host = "localhost"
+ port = 9999
+ }
}
-
```
* Start a port listening
diff --git a/docs/en/connector-v2/source/Socket.md
b/docs/en/connector-v2/source/Socket.md
index 2ce5848cb2..d2e17497c7 100644
--- a/docs/en/connector-v2/source/Socket.md
+++ b/docs/en/connector-v2/source/Socket.md
@@ -2,9 +2,11 @@
> Socket source connector
-## Description
+## Support Those Engines
-Used to read data from Socket.
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
## Key features
@@ -15,58 +17,42 @@ Used to read data from Socket.
- [ ] [parallelism](../../concept/connector-v2-features.md)
- [ ] [support user-defined split](../../concept/connector-v2-features.md)
-## Options
-
-| name | type | required | default value |
-|----------------|---------|----------|---------------|
-| host | String | Yes | |
-| port | Integer | Yes | |
-| common-options | | no | - |
-
-### host [string]
-
-socket server host
-
-### port [integer]
-
-socket server port
-
-### common options
+## Description
-Source plugin common parameters, please refer to [Source Common
Options](common-options.md) for details
+> Used to read data from Socket.
-## Example
+## Source Options
-simple:
+| Name | Type | Required | Default |
Description |
+|----------------|---------|----------|---------|---------------------------------------------------------------------------------------------------------|
+| host | String | Yes | | socket server host
|
+| port | Integer | Yes | | socket server port
|
+| common-options | | No | - | Source plugin common
parameters, please refer to [Source Common Options](common-options.md) for
details |
-```hocon
-Socket {
- host = "localhost"
- port = 9999
- }
-```
+## Task Example
-test:
+### Simple:
-* Configuring the SeaTunnel config file
+> This is a streaming accept Socket data source Writes to console output
```hocon
env {
+ # You can set flink configuration here
execution.parallelism = 1
- job.mode = "STREAMING"
+}
+Socket {
+ host = "localhost"
+ port = 9999
}
-source {
- Socket {
- host = "localhost"
- port = 9999
- }
+transform {
+ # 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/transform-v2/sql
}
sink {
Console {}
}
-
```
* Start a port listening