Skip to content

Commit

Permalink
[FLINK-34988][build] Fix the reflection issue of ExecutionEnvironment…
Browse files Browse the repository at this point in the history
…Impl for JDK17
  • Loading branch information
reswqa committed Apr 3, 2024
1 parent 163b9cc commit df7e0d9
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
10 changes: 10 additions & 0 deletions flink-datastream/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,16 @@ under the License.

<packaging>jar</packaging>

<properties>
<surefire.module.config><!--
we use reflection to register sink transformation translator,
it's a final map, we need to set this to pass tests in jdk17 or higher.
-->--add-opens=java.base/java.util=ALL-UNNAMED
</surefire.module.config>
</properties>



<dependencies>
<dependency>
<groupId>org.apache.flink</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public class ExecutionEnvironmentImpl implements ExecutionEnvironment {
DataStreamV2SinkTransformationTranslator.registerSinkTransformationTranslator();
} catch (Exception e) {
throw new RuntimeException(
"Can not register process function transformation translator.");
"Can not register process function transformation translator.", e);
}
}

Expand Down
5 changes: 5 additions & 0 deletions flink-runtime-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,11 @@ under the License.
<test.parameterProgram.name>parameter-program</test.parameterProgram.name>
<test.ParameterProgramNoManifest.name>parameter-program-without-manifest</test.ParameterProgramNoManifest.name>
<test.ParameterProgramWithEagerSink.name>parameter-program-with-eager-sink</test.ParameterProgramWithEagerSink.name>
<surefire.module.config><!--
DataStream V2 use reflection to register sink transformation translator,
it's a final map, we need to set this to pass tests in jdk17 or higher.
-->--add-opens=java.base/java.util=ALL-UNNAMED
</surefire.module.config>
</properties>

<dependencies>
Expand Down

0 comments on commit df7e0d9

Please sign in to comment.