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]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
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: GoogleCloudPlatform/python-docs-samples
Commit Name: 039a9a5e48f0504ca6c5376998a26b357bcef896
Time: 2020-04-23
Author: tmatsuo@google.com
File Name: compute/encryption/generate_wrapped_rsa_key_test.py
Class Name:
Method Name: test_create_disk