Skip to content

Commit 825052f

Browse files
authored
[FLINK-33361][connectors/kafka] Add Java 17 compatibility to Flink Kafka connector
1 parent c38a040 commit 825052f

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/push_pr.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,14 @@ jobs:
2626
strategy:
2727
matrix:
2828
flink: [ 1.17.1, 1.18.0 ]
29+
jdk: [ 8, 11, 17 ]
30+
exclude:
31+
- jdk: 17
32+
flink: 1.17.1
2933
uses: apache/flink-connector-shared-utils/.github/workflows/ci.yml@ci_utils
3034
with:
3135
flink_version: ${{ matrix.flink }}
32-
36+
jdk_version: ${{ matrix.jdk }}
3337
python_test:
3438
strategy:
3539
matrix:

flink-connector-kafka/pom.xml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ under the License.
3434

3535
<packaging>jar</packaging>
3636

37+
<properties>
38+
<flink.connector.module.config><!--
39+
FlinkKafkaProducerBaseTest --> --add-opens=java.base/java.lang=ALL-UNNAMED <!--
40+
FlinkKafkaProducerBaseTest --> --add-opens=java.base/java.util.concurrent.locks=ALL-UNNAMED <!--
41+
FlinkKafkaConsumerBaseTest --> --add-opens=java.base/java.util=ALL-UNNAMED <!--
42+
KafkaProducerExactlyOnceITCase --> --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED </flink.connector.module.config>
43+
</properties>
44+
3745
<dependencies>
3846

3947
<!-- Core -->

pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ under the License.
7878
<log4j.version>2.17.1</log4j.version>
7979

8080
<flink.parent.artifactId>flink-connector-kafka-parent</flink.parent.artifactId>
81+
82+
<!-- This property should contain the add-opens/add-exports commands required for the tests
83+
in the given connector's module to pass.
84+
It MUST be a space-separated list not containing any newlines,
85+
of entries in the form '[-]{2}add-[opens|exports]=<module>/<package>=ALL-UNNAMED'.-->
86+
<flink.connector.module.config/>
87+
<flink.surefire.baseArgLine>-XX:+UseG1GC -Xms256m -XX:+IgnoreUnrecognizedVMOptions ${flink.connector.module.config}</flink.surefire.baseArgLine>
8188
</properties>
8289

8390
<dependencies>

0 commit comments

Comments
 (0)