Skip to content

Commit adb4eaa

Browse files
committed
Remove linear backoff.
1 parent 55caa24 commit adb4eaa

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

ec2/spark_ec2.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -669,11 +669,10 @@ def wait_for_cluster_state(cluster_instances, cluster_state, opts):
669669

670670
start_time = datetime.now()
671671

672-
num_attempts = 0
673672
conn = ec2.connect_to_region(opts.region)
674673

675674
while True:
676-
time.sleep(3 * num_attempts) # seconds
675+
time.sleep(5) # seconds
677676

678677
for i in cluster_instances:
679678
i.update()
@@ -690,14 +689,13 @@ def wait_for_cluster_state(cluster_instances, cluster_state, opts):
690689
if all(i.state == cluster_state for i in cluster_instances):
691690
break
692691

693-
num_attempts += 1
694-
695692
sys.stdout.write(".")
696693
sys.stdout.flush()
697694

698695
sys.stdout.write("\n")
699696

700697
end_time = datetime.now()
698+
701699
print "Cluster is now in '{s}' state. Waited {t} seconds.".format(
702700
s=cluster_state,
703701
t=(end_time - start_time).seconds

0 commit comments

Comments
 (0)