Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@
TerminateSessionRequest,
)
from google.cloud.dataproc_v1.types.shared import (
AutotuningConfig,
Component,
EnvironmentConfig,
ExecutionConfig,
Expand Down Expand Up @@ -360,6 +361,7 @@
"ListSessionsResponse",
"Session",
"TerminateSessionRequest",
"AutotuningConfig",
"EnvironmentConfig",
"ExecutionConfig",
"GkeClusterConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,7 @@
TerminateSessionRequest,
)
from .types.shared import (
AutotuningConfig,
Component,
EnvironmentConfig,
ExecutionConfig,
Expand Down Expand Up @@ -226,6 +227,7 @@
"AutoscalingConfig",
"AutoscalingPolicy",
"AutoscalingPolicyServiceClient",
"AutotuningConfig",
"AuxiliaryNodeGroup",
"AuxiliaryServicesConfig",
"BasicAutoscalingAlgorithm",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
TerminateSessionRequest,
)
from .shared import (
AutotuningConfig,
Component,
EnvironmentConfig,
ExecutionConfig,
Expand Down Expand Up @@ -293,6 +294,7 @@
"ListSessionsResponse",
"Session",
"TerminateSessionRequest",
"AutotuningConfig",
"EnvironmentConfig",
"ExecutionConfig",
"GkeClusterConfig",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"KubernetesSoftwareConfig",
"GkeNodePoolTarget",
"GkeNodePoolConfig",
"AutotuningConfig",
"RepositoryConfig",
"PyPiRepositoryConfig",
},
Expand Down Expand Up @@ -138,6 +139,13 @@ class RuntimeConfig(proto.Message):
repository_config (google.cloud.dataproc_v1.types.RepositoryConfig):
Optional. Dependency repository
configuration.
autotuning_config (google.cloud.dataproc_v1.types.AutotuningConfig):
Optional. Autotuning configuration of the
workload.
cohort (str):
Optional. Cohort identifier. Identifies
families of the workloads having the same shape,
e.g. daily ETL jobs.
"""

version: str = proto.Field(
Expand All @@ -158,6 +166,15 @@ class RuntimeConfig(proto.Message):
number=5,
message="RepositoryConfig",
)
autotuning_config: "AutotuningConfig" = proto.Field(
proto.MESSAGE,
number=6,
message="AutotuningConfig",
)
cohort: str = proto.Field(
proto.STRING,
number=7,
)


class EnvironmentConfig(proto.Message):
Expand Down Expand Up @@ -870,6 +887,43 @@ class GkeNodePoolAutoscalingConfig(proto.Message):
)


class AutotuningConfig(proto.Message):
r"""Autotuning configuration of the workload.

Attributes:
scenarios (MutableSequence[google.cloud.dataproc_v1.types.AutotuningConfig.Scenario]):
Optional. Scenarios for which tunings are
applied.
"""

class Scenario(proto.Enum):
r"""Scenario represents a specific goal that autotuning will
attempt to achieve by modifying workloads.

Values:
SCENARIO_UNSPECIFIED (0):
Default value.
SCALING (2):
Scaling recommendations such as
initialExecutors.
BROADCAST_HASH_JOIN (3):
Adding hints for potential relation
broadcasts.
MEMORY (4):
Memory management for workloads.
"""
SCENARIO_UNSPECIFIED = 0
SCALING = 2
BROADCAST_HASH_JOIN = 3
MEMORY = 4

scenarios: MutableSequence[Scenario] = proto.RepeatedField(
proto.ENUM,
number=2,
enum=Scenario,
)


class RepositoryConfig(proto.Message):
r"""Configuration for dependency repositories

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2932,6 +2932,8 @@ def test_create_batch_rest(request_type):
"repository_config": {
"pypi_repository_config": {"pypi_repository": "pypi_repository_value"}
},
"autotuning_config": {"scenarios": [2]},
"cohort": "cohort_value",
},
"environment_config": {
"execution_config": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3334,6 +3334,8 @@ def test_create_session_rest(request_type):
"repository_config": {
"pypi_repository_config": {"pypi_repository": "pypi_repository_value"}
},
"autotuning_config": {"scenarios": [2]},
"cohort": "cohort_value",
},
"environment_config": {
"execution_config": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3436,6 +3436,8 @@ def test_create_session_template_rest(request_type):
"repository_config": {
"pypi_repository_config": {"pypi_repository": "pypi_repository_value"}
},
"autotuning_config": {"scenarios": [2]},
"cohort": "cohort_value",
},
"environment_config": {
"execution_config": {
Expand Down Expand Up @@ -3872,6 +3874,8 @@ def test_update_session_template_rest(request_type):
"repository_config": {
"pypi_repository_config": {"pypi_repository": "pypi_repository_value"}
},
"autotuning_config": {"scenarios": [2]},
"cohort": "cohort_value",
},
"environment_config": {
"execution_config": {
Expand Down