Skip to content

Commit a046247

Browse files
committed
fix
1 parent bc03cf8 commit a046247

21 files changed

Lines changed: 135 additions & 24 deletions

File tree

.github/workflows/checkstyle.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,22 @@ jobs:
3232
persist-credentials: false
3333
submodules: recursive
3434

35-
- name: Setup java
35+
- name: Setup java 8
3636
uses: actions/setup-java@v2
3737
with:
3838
distribution: adopt
3939
java-version: '8'
4040

4141
- name: Run java checkstyle
4242
run:
43-
cd flink-doris-connector && mvn clean compile checkstyle:checkstyle
43+
cd flink-doris-connector && mvn clean checkstyle:check -Pflink1 -pl flink-doris-connector-flink1 -am
44+
45+
- name: Setup java 17
46+
uses: actions/setup-java@v2
47+
with:
48+
distribution: adopt
49+
java-version: '17'
50+
51+
- name: Run java checkstyle
52+
run:
53+
cd flink-doris-connector && mvn clean checkstyle:check -Pflink2 -pl flink-doris-connector-flink2 -am

.github/workflows/run-e2ecase-flink1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323

2424
jobs:
2525
build-extension:
26-
name: "Run E2ECases Flink1.x"
26+
name: "Run E2ECases"
2727
runs-on: ubuntu-latest
2828
defaults:
2929
run:

.github/workflows/run-e2ecase-flink2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323

2424
jobs:
2525
build-extension:
26-
name: "Run E2ECases Flink2.x"
26+
name: "Run E2ECases"
2727
runs-on: ubuntu-latest
2828
defaults:
2929
run:

.github/workflows/run-itcase-flink1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323

2424
jobs:
2525
build-extension:
26-
name: "Run ITCases Flink1.x"
26+
name: "Run ITCases"
2727
runs-on: ubuntu-latest
2828
defaults:
2929
run:

.github/workflows/run-itcase-flink2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ on:
2323

2424
jobs:
2525
build-extension:
26-
name: "Run ITCases Flink2.x"
26+
name: "Run ITCases"
2727
runs-on: ubuntu-latest
2828
defaults:
2929
run:

.licenserc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ header:
1212
- '.github/PULL_REQUEST_TEMPLATE.md'
1313
- '.licenserc.yaml'
1414
- 'custom_env.sh.tpl'
15-
- 'flink-doris-connector/src/test/resources/container/'
15+
- 'flink-doris-connector/flink-doris-connector-base/src/test/resources/container/'
1616

1717
comment: on-failure

flink-doris-connector/flink-doris-connector-base/pom.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@ under the License.
2929

3030
<artifactId>flink-doris-connector-base</artifactId>
3131
<name>Flink Doris Connector Base</name>
32-
<description>Shared code for Flink Doris Connector; built per Flink version via profile (flink-1.20 / flink-2.2)</description>
32+
<description>Shared code for Flink Doris Connector; built per Flink version via profile (flink1 / flink2)</description>
3333
<packaging>jar</packaging>
3434

35-
<!-- flink.version, maven.compiler.source/target, come from parent profile (-Pflink-1.20 or -Pflink-2.2) -->
3635
<dependencies>
3736
<dependency>
3837
<groupId>org.apache.doris</groupId>

flink-doris-connector/flink-doris-connector-base/src/main/java/org/apache/doris/flink/sink/writer/DorisWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
*
5353
* <p>This is the core implementation that is shared across different Flink versions.
5454
* Version-specific modules should wrap this class and implement the appropriate Flink sink
55-
* interfaces there (for example via DorisWriterV1 / DorisWriterV2).
55+
* interfaces there (for example via DorisWriterAdapter).
5656
*
5757
* @param <IN> record type
5858
*/

flink-doris-connector/flink-doris-connector-flink1/src/main/java/org/apache/doris/flink/sink/DorisSink.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,18 +112,18 @@ public DorisAbstractWriter restoreWriter(
112112
public DorisAbstractWriter getDorisAbstractWriter(
113113
InitContext initContext, Collection<DorisWriterState> states) {
114114
if (WriteMode.STREAM_LOAD.equals(dorisExecutionOptions.getWriteMode())) {
115-
return new DorisWriterAdapter(
115+
return new DorisWriterAdapter<>(
116116
initContext,
117117
states,
118118
serializer,
119119
dorisOptions,
120120
dorisReadOptions,
121121
dorisExecutionOptions);
122122
} else if (WriteMode.STREAM_LOAD_BATCH.equals(dorisExecutionOptions.getWriteMode())) {
123-
return new DorisBatchWriterAdapter(
123+
return new DorisBatchWriterAdapter<>(
124124
initContext, serializer, dorisOptions, dorisReadOptions, dorisExecutionOptions);
125125
} else if (WriteMode.COPY.equals(dorisExecutionOptions.getWriteMode())) {
126-
return new DorisCopyWriterAdapter(
126+
return new DorisCopyWriterAdapter<>(
127127
initContext, serializer, dorisOptions, dorisReadOptions, dorisExecutionOptions);
128128
}
129129
throw new IllegalArgumentException(

flink-doris-connector/flink-doris-connector-flink1/src/main/java/org/apache/doris/flink/sink/copy/DorisCopyWriterAdapter.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,20 @@
1+
// Licensed to the Apache Software Foundation (ASF) under one
2+
// or more contributor license agreements. See the NOTICE file
3+
// distributed with this work for additional information
4+
// regarding copyright ownership. The ASF licenses this file
5+
// to you under the Apache License, Version 2.0 (the
6+
// "License"); you may not use this file except in compliance
7+
// with the License. You may obtain a copy of the License at
8+
//
9+
// http://www.apache.org/licenses/LICENSE-2.0
10+
//
11+
// Unless required by applicable law or agreed to in writing,
12+
// software distributed under the License is distributed on an
13+
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
// KIND, either express or implied. See the License for the
15+
// specific language governing permissions and limitations
16+
// under the License.
17+
118
package org.apache.doris.flink.sink.copy;
219

320
import org.apache.flink.api.connector.sink2.Sink;

0 commit comments

Comments
 (0)