0

I have an apache beam program in java running with direct runner. Apache beam uses threads in order to achieve distributed processing.

  1. At run time how can I know the number of threads spawned by apache beam?
  2. How can I set the maximum of number of threads to use at run time?
bigbounty
  • 16,526
  • 5
  • 37
  • 65

2 Answers2

0

This link below might be of help. In Java you seemingly can't as of 2021 Feb. In Python you can.

https://beam.apache.org/documentation/runners/direct/#parallel-execution

Sheel Pancholi
  • 621
  • 11
  • 25
0

You can use the getTargetParallelism and setTargetParallelism functions for this:

https://beam.apache.org/releases/javadoc/2.35.0/index.html?org/apache/beam/runners/direct/DirectOptions.html

matrik
  • 104
  • 3