Skip to content

Commit a36eed0

Browse files
committed
name ec2 instances and security groups consistently
Security groups created by spark-ec2 do not prepend “spark-“ to the name. Since naming the instances themselves is new to spark-ec2, it’s better to change that pattern to match the existing naming pattern for the security groups, rather than the other way around.
1 parent de7292a commit a36eed0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ec2/spark_ec2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -428,11 +428,11 @@ def launch_cluster(conn, opts, cluster_name):
428428
for master in master_nodes:
429429
master.add_tag(
430430
key='Name',
431-
value='spark-{cn}-master-{iid}'.format(cn=cluster_name, iid=master.id))
431+
value='{cn}-master-{iid}'.format(cn=cluster_name, iid=master.id))
432432
for slave in slave_nodes:
433433
slave.add_tag(
434434
key='Name',
435-
value='spark-{cn}-slave-{iid}'.format(cn=cluster_name, iid=slave.id))
435+
value='{cn}-slave-{iid}'.format(cn=cluster_name, iid=slave.id))
436436

437437
# Return all the instances
438438
return (master_nodes, slave_nodes)

0 commit comments

Comments
 (0)