File tree Expand file tree Collapse file tree
sdks/java/testing/nexmark Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -114,6 +114,19 @@ if (isSparkRunner) {
114114 }
115115}
116116
117+ def sparkJvmArgs () {
118+ def testJavaVer = project. findProperty(' testJavaVersion' ) ? (project. property(' testJavaVersion' ) as int ) : JavaVersion . current(). majorVersion. toInteger()
119+ if (testJavaVer >= 17 ) {
120+ return [
121+ " --add-opens=java.base/sun.nio.ch=ALL-UNNAMED" ,
122+ " --add-opens=java.base/java.nio=ALL-UNNAMED" ,
123+ " --add-opens=java.base/java.util=ALL-UNNAMED" ,
124+ " --add-opens=java.base/java.lang.invoke=ALL-UNNAMED"
125+ ]
126+ }
127+ return []
128+ }
129+
117130def getNexmarkArgs = {
118131 def nexmarkArgsStr = project. findProperty(nexmarkArgsProperty) ?: " "
119132 def nexmarkArgsList = new ArrayList<String > ()
@@ -179,6 +192,7 @@ task run(type: JavaExec) {
179192 systemProperty " spark.ui.showConsoleProgress" , " false"
180193 // Dataset runner only
181194 systemProperty " spark.sql.shuffle.partitions" , " 4"
195+ jvmArgs + = sparkJvmArgs()
182196 }
183197
184198 mainClass = " org.apache.beam.sdk.nexmark.Main"
You can’t perform that action at this time.
0 commit comments