Skip to content

Commit 684a43d

Browse files
vamossagar12loserwang1024wuchong
authored
[flink] Support Flink 2.2 and remove Flink 2.1 (#2167)
--------- Co-authored-by: Hongshun Wang <[email protected]> Co-authored-by: Jark Wu <[email protected]>
1 parent 50cd9ff commit 684a43d

File tree

36 files changed

+712
-475
lines changed

36 files changed

+712
-475
lines changed

.github/workflows/stage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ STAGE_LAKE="lake"
2424
MODULES_FLINK="\
2525
fluss-flink,\
2626
fluss-flink/fluss-flink-common,\
27-
fluss-flink/fluss-flink-2.1,\
27+
fluss-flink/fluss-flink-2.2,\
2828
fluss-flink/fluss-flink-1.20,\
2929
"
3030

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one or more
3+
* contributor license agreements. See the NOTICE file distributed with
4+
* this work for additional information regarding copyright ownership.
5+
* The ASF licenses this file to You under the Apache License, Version 2.0
6+
* (the "License"); you may not use this file except in compliance with
7+
* 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, software
12+
* distributed under the License is distributed on an "AS IS" BASIS,
13+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
* See the License for the specific language governing permissions and
15+
* limitations under the License.
16+
*/
17+
18+
package org.apache.fluss.flink.adapter;
19+
20+
import org.apache.flink.api.common.operators.MailboxExecutor;
21+
import org.apache.flink.api.connector.sink2.Sink;
22+
import org.apache.flink.api.connector.sink2.SinkWriter;
23+
import org.apache.flink.metrics.groups.SinkWriterMetricGroup;
24+
25+
import java.io.IOException;
26+
27+
/**
28+
* Flink sink adapter which hide the different version of createWriter method.
29+
*
30+
* <p>TODO: remove this class when no longer support all the Flink 1.x series.
31+
*/
32+
public abstract class SinkAdapter<InputT> implements Sink<InputT> {
33+
34+
@Override
35+
public SinkWriter<InputT> createWriter(InitContext initContext) throws IOException {
36+
return createWriter(initContext.getMailboxExecutor(), initContext.metricGroup());
37+
}
38+
39+
protected abstract SinkWriter<InputT> createWriter(
40+
MailboxExecutor mailboxExecutor, SinkWriterMetricGroup metricGroup);
41+
}

fluss-flink/fluss-flink-2.1/src/main/java/org/apache/flink/api/connector/sink2/Sink.java

Lines changed: 0 additions & 61 deletions
This file was deleted.

fluss-flink/fluss-flink-2.1/src/main/java/org/apache/fluss/flink/catalog/Flink21Catalog.java

Lines changed: 0 additions & 136 deletions
This file was deleted.

fluss-flink/fluss-flink-2.1/src/main/java/org/apache/fluss/flink/catalog/Flink21CatalogFactory.java

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)