Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/beam_PostCommit_PortableJar_Flink.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ jobs:
uses: ./.github/actions/setup-environment-action
with:
python-version: default
java-version: '17'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see

Exception in thread "main" java.util.ServiceConfigurationError: java.net.spi.InetAddressResolverProvider: Provider org.xbill.DNS.spi.DnsjavaInetAddressResolverProvider not found
	at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:593)

due to CI bumped to Java21. This should be fixed by 'Multi-Release': 'true'. Does pin to Java17 still needed and why?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried 'Multi-Release': 'true' with Java21, the same error

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ideally not pin to Java17 as we still need to fix it later on. Tested in https://github.com/apache/beam/actions/runs/33089112555

c6f125a#diff-b54459154d5fd469e3aee54c9f7fe7017242b6c289f25d7a9433e2e7a15c07ebR354

excluding 'META-INF/services/java.net.spi.InetAddressResolverProvider' from the miniCluster jar it now works

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened #39905

- name: run testPipelineJarFlinkRunner script
env:
CLOUDSDK_CONFIG: ${{ env.KUBELET_GCLOUD_CONFIG_PATH}}
Expand Down
5 changes: 4 additions & 1 deletion runners/flink/job-server/flink_job_server.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,10 @@ tasks.register("miniCluster", Jar) {
exclude "**/PortablePipelineJarUtils*"
}
manifest {
attributes('Main-Class': 'org.apache.beam.runners.flink.FlinkMiniClusterEntryPoint')
attributes(
'Main-Class': 'org.apache.beam.runners.flink.FlinkMiniClusterEntryPoint',
'Multi-Release': 'true'
)
}
zip64 true // jar needs to contain more than 65535 files
}
12 changes: 11 additions & 1 deletion runners/portability/test_flink_uber_jar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,17 @@ s.close()
FLINK_PORT=$(python -c "$SOCKET_SCRIPT")

echo "Starting Flink mini cluster listening on port $FLINK_PORT"
java -Dorg.slf4j.simpleLogger.defaultLogLevel=warn -jar "$FLINK_MINI_CLUSTER_JAR" --rest-port "$FLINK_PORT" --rest-bind-address localhost &
java \
--add-opens=java.base/sun.nio.ch=ALL-UNNAMED \
--add-opens=java.base/java.nio=ALL-UNNAMED \
--add-opens=java.base/java.util=ALL-UNNAMED \
--add-opens=java.base/java.lang.invoke=ALL-UNNAMED \
--add-opens=java.base/java.lang=ALL-UNNAMED \
-Djava.security.manager=allow \
-Dorg.slf4j.simpleLogger.defaultLogLevel=warn \
-jar "$FLINK_MINI_CLUSTER_JAR" \
--rest-port "$FLINK_PORT" \
--rest-bind-address localhost &

PIPELINE_PY="
import apache_beam as beam
Expand Down
Loading