Github user nchammas commented on a diff in the pull request:

    https://github.com/apache/spark/pull/3195#discussion_r20527728
  
    --- Diff: ec2/spark_ec2.py ---
    @@ -655,33 +663,44 @@ def wait_for_cluster_state(cluster_instances, 
cluster_state, opts):
                (would be nice to replace this with a proper enum: 
http://stackoverflow.com/a/1695250)
         """
         sys.stdout.write(
    -        "Waiting for all instances in cluster to enter '{s}' 
state.".format(s=cluster_state)
    +        "Waiting for cluster to enter '{s}' state.".format(s=cluster_state)
         )
         sys.stdout.flush()
     
    -    num_attempts = 0
    +    start_time = datetime.now()
    +
    +    conn = ec2.connect_to_region(opts.region)
     
         while True:
    -        time.sleep(3 * num_attempts)
    +        time.sleep(5)  # seconds
     
             for i in cluster_instances:
    -            s = i.update()  # capture output to suppress print to screen 
in newer versions of boto
    --- End diff --
    
    Nope, it never was.
    
    When I originally added this in, I was testing in the Python shell and got 
confused. `i.update()` echoes its return value to the shell, so I thought I 
needed to suppress that output. But as part of a program, nothing gets echoed. 
We don't need the return value, so there's no need to capture it.
    
    It's like just typing `var` in the shell and seeing its value. As part of a 
program, `var` alone will do nothing.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to