1bddafd3102e4e0841d78673581c3ead8f68a7c8,dataproc/submit_job_to_cluster.py,,list_clusters_with_details,#,117

Before Change



// [START dataproc_list_clusters_with_detail]
def list_clusters_with_details(dataproc, project, region):
    result = dataproc.projects().regions().clusters().list(
        projectId=project,
        region=region).execute()
    cluster_list = result["clusters"]
    for cluster in cluster_list:
        print("{} - {}"
              .format(cluster["clusterName"], cluster["status"]["state"]))

After Change


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,
                                cluster.status.State.Name(
                                    cluster.status.state))))
// [END dataproc_list_clusters_with_detail]


def get_cluster_id_by_name(dataproc, project_id, region, 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: list_clusters_with_details


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


Project Name: maciejkula/spotlight
Commit Name: 1201490527705830a9887cc5d8f4d0556304dcc8
Time: 2017-07-15
Author: maciej.kula@gmail.com
File Name: examples/movielens_sequence/helpers.py
Class Name:
Method Name: _print_df