[
https://issues.apache.org/jira/browse/BEAM-10222?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17148916#comment-17148916
]
Kenneth Knowles commented on BEAM-10222:
----------------------------------------
I've been trying to reproduce this in an isolated setting. On my mac on Cloud
Shell and on a fairly realistic 96-core Dataflow worker VM (the images are
public and you can start one if you like) I get correct results following these
steps:
{code}
docker pull gcr.io/cloud-dataflow/v1beta3/beam-java11-batch:beam-2.22.0
docker run --interactive --tty --entrypoint /bin/bash
gcr.io/cloud-dataflow/v1beta3/beam-java11-batch:beam-2.22.0
/usr/local/jdk-11-latest/bin/jshell
Runtime.getRuntime().availableProcessors()
{code}
> Java11 only detects 1 CPU when running on Dataflow
> --------------------------------------------------
>
> Key: BEAM-10222
> URL: https://issues.apache.org/jira/browse/BEAM-10222
> Project: Beam
> Issue Type: Bug
> Components: sdk-java-core
> Reporter: Mikhail Gryzykhin
> Priority: P2
>
> When specifying the worker-type as "n1-highcpu-4" the resulting thread number
> is 4 when the pipeline is compiled by Java8, and only 1 when the pipeline is
> compiled by Java11.
> Specifying numberOfWorkerHarnessThreads does not change amount of detected
> threads.
> Amount of available CPUs is received via
> "Runtime.getRuntime().availableProcessors()"
--
This message was sent by Atlassian Jira
(v8.3.4#803005)