Skip to content

Commit

Permalink
Merge customizations for EMR
Browse files Browse the repository at this point in the history
  • Loading branch information
aws-sdk-python-automation committed Nov 22, 2024
1 parent 099ed90 commit 1cc1db3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
16 changes: 16 additions & 0 deletions awscli/customizations/emr/argumentschema.py
Original file line number Diff line number Diff line change
Expand Up @@ -849,6 +849,22 @@
"The parameter is used to split capacity allocation between core and task nodes."
}
}
},
"ScalingStrategy": {
"type": "string",
"enum": ["DEFAULT", "ADVANCED"],
"description":
"Determines whether a custom scaling utilization performance index can be set. "
"Possible values include ADVANCED or DEFAULT."
},
"UtilizationPerformanceIndex": {
"type": "integer",
"description":
"An integer value that represents an advanced scaling strategy. "
"Setting a higher value optimizes for performance. "
"Setting a lower value optimizes for resource conservation. "
"Setting the value to 50 balances performance and resource conservation. "
"Possible values are 1, 25, 50, 75, and 100."
}
}
}
Expand Down
26 changes: 26 additions & 0 deletions tests/unit/customizations/emr/test_create_cluster_release_label.py
Original file line number Diff line number Diff line change
Expand Up @@ -1496,6 +1496,32 @@ def test_create_cluster_with_managed_scaling_policy(self):
}
self.assert_params_for_cmd(cmd, result)

def test_create_cluster_with_managed_scaling_policy_customer_knobs(self):
cmd = (self.prefix + '--release-label emr-5.28.0 --security-configuration MySecurityConfig ' +
'--managed-scaling-policy ComputeLimits={MinimumCapacityUnits=2,MaximumCapacityUnits=4,' +
'UnitType=Instances,MaximumCoreCapacityUnits=1},ScalingStrategy=ADVANCED,' +
'UtilizationPerformanceIndex=1 --instance-groups ' + DEFAULT_INSTANCE_GROUPS_ARG)
result = \
{
'Name': DEFAULT_CLUSTER_NAME,
'Instances': DEFAULT_INSTANCES,
'ReleaseLabel': 'emr-5.28.0',
'VisibleToAllUsers': True,
'Tags': [],
'ManagedScalingPolicy': {
'ComputeLimits': {
'MinimumCapacityUnits': 2,
'MaximumCapacityUnits': 4,
'UnitType': 'Instances',
'MaximumCoreCapacityUnits': 1
},
'ScalingStrategy': 'ADVANCED',
'UtilizationPerformanceIndex': 1,
},
'SecurityConfiguration': 'MySecurityConfig'
}
self.assert_params_for_cmd(cmd, result)

def test_create_cluster_with_auto_termination_policy(self):
cmd = (self.prefix + '--release-label emr-5.34.0 ' +
'--auto-termination-policy IdleTimeout=100 ' +
Expand Down

0 comments on commit 1cc1db3

Please sign in to comment.