Skip to content
Closed
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
16 changes: 14 additions & 2 deletions ec2/spark_ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ def get_validate_spark_version(version, repo):


# Source: http://aws.amazon.com/amazon-linux-ami/instance-type-matrix/
# Last Updated: 2015-05-08
# Last Updated: 2015-06-19
# For easy maintainability, please keep this manually-inputted dictionary sorted by key.
EC2_INSTANCE_TYPES = {
"c1.medium": "pvm",
Expand Down Expand Up @@ -400,6 +400,11 @@ def get_validate_spark_version(version, repo):
"m3.large": "hvm",
"m3.xlarge": "hvm",
"m3.2xlarge": "hvm",
"m4.large": "hvm",
"m4.xlarge": "hvm",
"m4.2xlarge": "hvm",
"m4.4xlarge": "hvm",
"m4.10xlarge": "hvm",
"r3.large": "hvm",
"r3.xlarge": "hvm",
"r3.2xlarge": "hvm",
Expand All @@ -409,6 +414,7 @@ def get_validate_spark_version(version, repo):
"t2.micro": "hvm",
"t2.small": "hvm",
"t2.medium": "hvm",
"t2.large": "hvm",
}


Expand Down Expand Up @@ -911,7 +917,7 @@ def wait_for_cluster_state(conn, opts, cluster_instances, cluster_state):
# Get number of local disks available for a given EC2 instance type.
def get_num_disks(instance_type):
# Source: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html
# Last Updated: 2015-05-08
# Last Updated: 2015-06-19
# For easy maintainability, please keep this manually-inputted dictionary sorted by key.
disks_by_instance = {
"c1.medium": 1,
Expand Down Expand Up @@ -953,6 +959,11 @@ def get_num_disks(instance_type):
"m3.large": 1,
"m3.xlarge": 2,
"m3.2xlarge": 2,
"m4.large": 0,
"m4.xlarge": 0,
"m4.2xlarge": 0,
"m4.4xlarge": 0,
"m4.10xlarge": 0,
"r3.large": 1,
"r3.xlarge": 1,
"r3.2xlarge": 1,
Expand All @@ -962,6 +973,7 @@ def get_num_disks(instance_type):
"t2.micro": 0,
"t2.small": 0,
"t2.medium": 0,
"t2.large": 0,
}
if instance_type in disks_by_instance:
return disks_by_instance[instance_type]
Expand Down