You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| fenodes | String | Yes | - |`Doris` cluster fenodes address, the format is `"fe_ip:fe_http_port, ..."`|
45
+
| benodes | String | No | - |`Doris` BE http address list used when `direct_to_be=true`, the format is `"be_ip:be_http_port, ..."`|
46
+
| direct_to_be | bool | No | false | Whether to send stream load write requests directly to `benodes`. This is an opt-in mode and does not change the default FE path. |
45
47
| query-port | int | No | 9030 |`Doris` Fenodes query_port |
@@ -64,6 +66,19 @@ The internal implementation of Doris sink connector is cached and imported by st
64
66
| custom_sql | String | no | - | When data_save_mode selects CUSTOM_PROCESSING, you should fill in the CUSTOM_SQL parameter. This parameter usually fills in a SQL that can be executed. SQL will be executed before synchronization tasks. |
65
67
| doris.config | map | yes | - | This option is used to support operations such as `insert`, `delete`, and `update` when automatically generate sql,and supported formats. |
66
68
69
+
## Redirect Behavior
70
+
71
+
By default, Doris sink sends Stream Load requests to the FE nodes configured by `fenodes`.
72
+
73
+
When `direct_to_be=true`, SeaTunnel uses `benodes` for the Stream Load data write path.
74
+
75
+
If `sink.enable-2pc=true` at the same time:
76
+
77
+
- pre-commit data write requests use `benodes`
78
+
- 2PC commit/abort control requests still use `fenodes`
79
+
80
+
This mixed path keeps the default FE control path while allowing the data path to bypass unstable FE redirect scenarios.
81
+
67
82
### schema_save_mode [Enum]
68
83
69
84
Before the synchronous task is turned on, different treatment schemes are selected for the existing surface structure of the target side.
@@ -175,6 +190,16 @@ This is because the total amount of data arriving at the end may not exceed the
175
190
176
191
Otherwise, if you enable the 2pc by the property `sink.enable-2pc=true`.The `sink.buffer-size` will have no effect. So only the checkpoint can trigger the commit.
177
192
193
+
## Troubleshooting 307 Temporary Redirect
194
+
195
+
If the job fails with `HTTP/1.1 307 Temporary Redirect`, check the following items first:
196
+
197
+
1. Whether the SeaTunnel worker can reach the redirected Doris BE address
198
+
2. Whether Doris FE is under heavy load, timeout, or Full GC pressure
199
+
3. Whether a proxy, SLB, ingress, or gateway rewrites or blocks the redirect path
200
+
201
+
If your environment already has reachable Doris BE HTTP addresses, you can configure `benodes` and set `direct_to_be=true` to bypass FE redirect on the data write path.
202
+
178
203
## Task Example
179
204
180
205
### Simple
@@ -235,6 +260,49 @@ sink {
235
260
}
236
261
```
237
262
263
+
### Direct To BE
264
+
265
+
```hocon
266
+
sink {
267
+
Doris {
268
+
fenodes = "fe1:8030,fe2:8030"
269
+
benodes = "be1:8040,be2:8040"
270
+
direct_to_be = true
271
+
username = root
272
+
password = ""
273
+
database = "test"
274
+
table = "e2e_table_sink"
275
+
sink.label-prefix = "test-direct-be"
276
+
doris.config {
277
+
format = "json"
278
+
read_json_by_line = "true"
279
+
}
280
+
}
281
+
}
282
+
```
283
+
284
+
### Direct To BE With 2PC
285
+
286
+
```hocon
287
+
sink {
288
+
Doris {
289
+
fenodes = "fe1:8030,fe2:8030"
290
+
benodes = "be1:8040,be2:8040"
291
+
direct_to_be = true
292
+
username = root
293
+
password = ""
294
+
database = "test"
295
+
table = "e2e_table_sink"
296
+
sink.label-prefix = "test-direct-be-2pc"
297
+
sink.enable-2pc = true
298
+
doris.config {
299
+
format = "json"
300
+
read_json_by_line = "true"
301
+
}
302
+
}
303
+
}
304
+
```
305
+
238
306
### CDC(Change Data Capture) Event
239
307
240
308
> This example defines a SeaTunnel synchronization task that automatically generates data through FakeSource and sends it to Doris Sink,FakeSource simulates CDC data with schema, score (int type),Doris needs to create a table sink named test.e2e_table_sink and a corresponding table for it.
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/config/DorisSinkConfig.java
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/config/DorisSinkOptions.java
+14Lines changed: 14 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -71,6 +71,20 @@ public class DorisSinkOptions extends DorisBaseOptions {
71
71
.defaultValue(false)
72
72
.withDescription("whether to enable the delete function");
73
73
74
+
publicstaticfinalOption<String> BENODES =
75
+
Options.key("benodes")
76
+
.stringType()
77
+
.noDefaultValue()
78
+
.withDescription(
79
+
"doris be http address list used when direct_to_be is enabled.");
80
+
81
+
publicstaticfinalOption<Boolean> DIRECT_TO_BE =
82
+
Options.key("direct_to_be")
83
+
.booleanType()
84
+
.defaultValue(false)
85
+
.withDescription(
86
+
"whether to send stream load write requests directly to Doris BE.");
Copy file name to clipboardExpand all lines: seatunnel-connectors-v2/connector-doris/src/main/java/org/apache/seatunnel/connectors/doris/sink/DorisSinkFactory.java
0 commit comments