Skip to content
Open
Show file tree
Hide file tree
Changes from 11 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
4 changes: 2 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

## New Features / Improvements

* Added support for setting disk provisioned IOPS and throughput in Dataflow runner via `--diskProvisionedIops` and `--diskProvisionedThroughputMibps` pipeline options (Java/Go) ([#38349](https://github.com/apache/beam/issues/38349)).
* Added support for setting disk provisioned IOPS and throughput in Dataflow runner via `--diskProvisionedIops` and `--diskProvisionedThroughputMibps` pipeline options (Java/Go/Python) ([#38349](https://github.com/apache/beam/issues/38349)).
* X feature added (Java/Python) ([#X](https://github.com/apache/beam/issues/X)).
* TriggerStateMachineRunner changes from BitSetCoder to SentinelBitSetCoder to
encode finished bitset. SentinelBitSetCoder and BitSetCoder are state
Expand Down Expand Up @@ -2435,4 +2435,4 @@ Schema Options, it will be removed in version `2.23.0`. ([BEAM-9704](https://iss

## Highlights

- For versions 2.19.0 and older release notes are available on [Apache Beam Blog](https://beam.apache.org/blog/).
- For versions 2.19.0 and older release notes are available on [Apache Beam Blog](https://beam.apache.org/blog/).
Comment thread
tvalentyn marked this conversation as resolved.
18 changes: 18 additions & 0 deletions sdks/python/apache_beam/options/pipeline_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -1405,6 +1405,24 @@ def _add_argparse_args(cls, parser):
dest='disk_type',
default=None,
help=('Specifies what type of persistent disk should be used.'))
parser.add_argument(
'--disk_provisioned_iops',
type=int,
default=None,
dest='disk_provisioned_iops',
help=(
'The provisioned IOPS of the disk. If not set, the Dataflow service'
' will choose a reasonable default.'),
)
parser.add_argument(
'--disk_provisioned_throughput_mibps',
type=int,
default=None,
dest='disk_provisioned_throughput_mibps',
help=(
'The provisioned throughput of the disk in MiB/s. If not set, the'
' Dataflow service will choose a reasonable default.'),
)
parser.add_argument(
'--worker_region',
default=None,
Expand Down
6 changes: 6 additions & 0 deletions sdks/python/apache_beam/options/pipeline_options_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,12 +444,18 @@ def test_worker_options(self):
'abc',
'--disk_type',
'def',
'--disk_provisioned_iops',
'4000',
'--disk_provisioned_throughput_mibps',
'200',
'--element_processing_timeout_minutes',
'10',
])
worker_options = options.view_as(WorkerOptions)
self.assertEqual(worker_options.machine_type, 'abc')
self.assertEqual(worker_options.disk_type, 'def')
self.assertEqual(worker_options.disk_provisioned_iops, 4000)
self.assertEqual(worker_options.disk_provisioned_throughput_mibps, 200)
self.assertEqual(worker_options.element_processing_timeout_minutes, 10)

options = PipelineOptions(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,11 @@ def __init__(
pool.diskSizeGb = self.worker_options.disk_size_gb
if self.worker_options.disk_type:
pool.diskType = self.worker_options.disk_type
if self.worker_options.disk_provisioned_iops is not None:
pool.diskProvisionedIops = self.worker_options.disk_provisioned_iops
if self.worker_options.disk_provisioned_throughput_mibps is not None:
pool.diskProvisionedThroughputMibps = (
self.worker_options.disk_provisioned_throughput_mibps)
if self.worker_options.zone:
pool.zone = self.worker_options.zone
if self.worker_options.network:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -609,6 +609,23 @@ def test_number_of_worker_harness_threads(self):
FAKE_PIPELINE_URL)
self.assertEqual(env.proto.workerPools[0].numThreadsPerWorker, 2)

def test_disk_provisioning_options(self):
pipeline_options = PipelineOptions([
'--temp_location',
'gs://any-location/temp',
'--disk_provisioned_iops',
'4000',
'--disk_provisioned_throughput_mibps',
'200'
])
env = apiclient.Environment([],
pipeline_options,
'2.0.0',
FAKE_PIPELINE_URL)
self.assertEqual(env.proto.workerPools[0].diskProvisionedIops, 4000)
self.assertEqual(
env.proto.workerPools[0].diskProvisionedThroughputMibps, 200)

@mock.patch(
'apache_beam.runners.dataflow.internal.apiclient.'
'beam_version.__version__',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7775,6 +7775,9 @@ class WorkerPool(_messages.Message):
defaultPackageSet: The default package set to install. This allows the
service to select a default set of packages which are useful to worker
harnesses written in a particular language.
diskProvisionedIops: Optional. IOPS provisioned for the root disk for VMs.
Copy link
Copy Markdown
Contributor

@tvalentyn tvalentyn May 5, 2026

Choose a reason for hiding this comment

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

i believe this file is normally autogenerated. was this a manual change?

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.

cc: @jrmccluskey -- anything to watch out for here regarding your work on deprecating apitools?

diskProvisionedThroughputMibps: Optional. Throughput provisioned for the
root disk for VMs.
diskSizeGb: Size of root disk for VMs, in GB. If zero or unspecified, the
service will attempt to choose a reasonable default.
diskSourceImage: Fully qualified source image for disks.
Expand Down Expand Up @@ -7957,6 +7960,8 @@ class AdditionalProperty(_messages.Message):
teardownPolicy = _messages.EnumField('TeardownPolicyValueValuesEnum', 20)
workerHarnessContainerImage = _messages.StringField(21)
zone = _messages.StringField(22)
diskProvisionedIops = _messages.IntegerField(23)
diskProvisionedThroughputMibps = _messages.IntegerField(24)


class WorkerSettings(_messages.Message):
Expand Down
Loading