Skip to content

Commit

Permalink
Add support for Dataproc Serverless Native Query Execution engine.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 704876717
  • Loading branch information
dorellang authored and copybara-github committed Dec 11, 2024
1 parent b1ee7f6 commit c87e68c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions perfkitbenchmarker/configs/benchmark_config_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,13 @@ def _GetOptionDecoderConstructions(cls):
option_decoders.IntDecoder,
{'default': None, 'none_ok': True},
),
'dataproc_serverless_runtime_engine': (
option_decoders.EnumDecoder,
{
'valid_values': ('spark', 'native'),
'default': 'spark',
},
),
'dataproc_serverless_memory_overhead': (
option_decoders.IntDecoder,
{'default': None, 'none_ok': True},
Expand Down
3 changes: 3 additions & 0 deletions perfkitbenchmarker/providers/gcp/gcp_dpb_dataproc.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,6 +699,8 @@ def GetJobProperties(self) -> Dict[str, str]:
result['spark.executor.memoryOverhead'] = (
f'{self.spec.dataproc_serverless_memory_overhead}m'
)
if self.spec.dataproc_serverless_runtime_engine == 'native':
result['spark.dataproc.runtimeEngine'] = 'native'
result.update(super().GetJobProperties())
return result

Expand Down Expand Up @@ -751,6 +753,7 @@ def _FillMetadata(self) -> None:
'dpb_disk_size': self.metadata['dpb_disk_size'],
'dpb_service_zone': self.metadata['dpb_service_zone'],
'dpb_job_properties': self.metadata['dpb_job_properties'],
'dpb_runtime_engine': self.spec.dataproc_serverless_runtime_engine,
}

def CalculateLastJobCosts(self) -> dpb_service.JobCosts:
Expand Down

0 comments on commit c87e68c

Please sign in to comment.