Closed
Description
In which file did you encounter the issue?
python-docs-samples/dataproc/submit_job_to_cluster.py
Describe the issue
Is it possible to add the master machine type
and worker machine type
args in the following function?
# [START create_cluster]
def create_cluster(dataproc, project, zone, region, cluster_name):
print('Creating cluster...')
zone_uri = \
'https://www.googleapis.com/compute/v1/projects/{}/zones/{}'.format(
project, zone)
cluster_data = {
'projectId': project,
'clusterName': cluster_name,
'config': {
'gceClusterConfig': {
'zoneUri': zone_uri
}
}
}
result = dataproc.projects().regions().clusters().create(
projectId=project,
region=region,
body=cluster_data).execute()
return result
# [END create_cluster]