Skip to content

Commit bf9c403

Browse files
committed
Made EBS volume type configurable.
1 parent c8e25ea commit bf9c403

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ec2/spark_ec2.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def parse_args():
103103
parser.add_option(
104104
"--ebs-vol-size", metavar="SIZE", type="int", default=0,
105105
help="Size (in GB) of each EBS volume.")
106+
parser.add_option(
107+
"--ebs-vol-type", default="standard",
108+
help="EBS volume type (e.g. 'gp2', 'io1', 'standard').")
106109
parser.add_option(
107110
"--ebs-vol-num", type="int", default=1,
108111
help="Number of EBS volumes to attach to each node as /vol[x]. " +
@@ -360,7 +363,7 @@ def launch_cluster(conn, opts, cluster_name):
360363
for i in range(opts.ebs_vol_num):
361364
device = EBSBlockDeviceType()
362365
device.size = opts.ebs_vol_size
363-
device.volume_type="gp2"
366+
device.volume_type=opts.ebs_vol_type
364367
device.delete_on_termination = True
365368
block_map["/dev/sd" + chr(ord('s') + i)] = device
366369

0 commit comments

Comments
 (0)