1bddafd3102e4e0841d78673581c3ead8f68a7c8,dataproc/submit_job_to_cluster.py,,wait_for_cluster_creation,#,98

Before Change


            projectId=project_id,
            region=region).execute()
        cluster_list = result["clusters"]
        cluster = [c
                   for c in cluster_list
                   if c["clusterName"] == cluster_name][0]
        if cluster["status"]["state"] == "ERROR":
            raise Exception(result["status"]["details"])
        if cluster["status"]["state"] == "RUNNING":
            print("Cluster created.")

After Change


    Wait for cluster creation.
    print("Waiting for cluster creation...")

    while True:
        if not waiting_callback:
            print("Cluster created.")
            break


// [START dataproc_list_clusters_with_detail]
def list_clusters_with_details(dataproc, project, region):
    List the details of clusters in the region.
    for cluster in dataproc.list_clusters(project, region):
        print(("{} - {}".format(cluster.cluster_name,
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: GoogleCloudPlatform/python-docs-samples
Commit Name: 1bddafd3102e4e0841d78673581c3ead8f68a7c8
Time: 2019-05-20
Author: amancuso@google.com
File Name: dataproc/submit_job_to_cluster.py
Class Name:
Method Name: wait_for_cluster_creation


Project Name: 7ossam81/EvoloPy
Commit Name: b050fe8d132a7d8899173e1c24d5906dbb943745
Time: 2019-02-26
Author: raneem.qaddoura@gmail.com
File Name: GA.py
Class Name:
Method Name: pairSelection


Project Name: geekcomputers/Python
Commit Name: 139259ac8ac83160502cbb896371ce4fa4027361
Time: 2019-10-10
Author: ml.smiley3@gmail.com
File Name: primelib/primelib.py
Class Name:
Method Name: isPrime