[enhancement](doc) When we use flink doris connector with bounded source, we should using the BATCH mode. (#12576)
This commit is contained in:
@ -253,6 +253,8 @@ env.fromSource(dorisSource, WatermarkStrategy.noWatermarks(), "doris source").pr
|
||||
```java
|
||||
// enable checkpoint
|
||||
env.enableCheckpointing(10000);
|
||||
// using batch mode for bounded data
|
||||
env.setRuntimeMode(RuntimeExecutionMode.BATCH);
|
||||
|
||||
DorisSink.Builder<String> builder = DorisSink.builder();
|
||||
DorisOptions.Builder dorisBuilder = DorisOptions.builder();
|
||||
@ -292,6 +294,8 @@ source.map((MapFunction<Tuple2<String, Integer>, String>) t -> t.f0 + "\t" + t.f
|
||||
```java
|
||||
// enable checkpoint
|
||||
env.enableCheckpointing(10000);
|
||||
// using batch mode for bounded data
|
||||
env.setRuntimeMode(RuntimeExecutionMode.BATCH);
|
||||
|
||||
//doris sink option
|
||||
DorisSink.Builder<RowData> builder = DorisSink.builder();
|
||||
@ -463,4 +467,4 @@ WITH (
|
||||
2. **errCode = 2, detailMessage = Label [label_0_1] has already been used, relate to txn [19650]**
|
||||
|
||||
In the Exactly-Once scenario, the Flink Job must be restarted from the latest Checkpoint/Savepoint, otherwise the above error will be reported.
|
||||
When Exactly-Once is not required, it can also be solved by turning off 2PC commits (sink.enable-2pc=false) or changing to a different sink.label-prefix.
|
||||
When Exactly-Once is not required, it can also be solved by turning off 2PC commits (sink.enable-2pc=false) or changing to a different sink.label-prefix.
|
||||
|
||||
@ -257,6 +257,8 @@ env.fromSource(dorisSource, WatermarkStrategy.noWatermarks(), "doris source").pr
|
||||
```java
|
||||
// enable checkpoint
|
||||
env.enableCheckpointing(10000);
|
||||
// using batch mode for bounded data
|
||||
env.setRuntimeMode(RuntimeExecutionMode.BATCH);
|
||||
|
||||
DorisSink.Builder<String> builder = DorisSink.builder();
|
||||
DorisOptions.Builder dorisBuilder = DorisOptions.builder();
|
||||
@ -289,6 +291,8 @@ source.map((MapFunction<Tuple2<String, Integer>, String>) t -> t.f0 + "\t" + t.f
|
||||
```java
|
||||
// enable checkpoint
|
||||
env.enableCheckpointing(10000);
|
||||
// using batch mode for bounded data
|
||||
env.setRuntimeMode(RuntimeExecutionMode.BATCH);
|
||||
|
||||
//doris sink option
|
||||
DorisSink.Builder<RowData> builder = DorisSink.builder();
|
||||
|
||||
Reference in New Issue
Block a user