Skip to content
This repository was archived by the owner on Nov 29, 2023. It is now read-only.

Commit 3343665

Browse files
authored
fix: (samples) fixing samples for new machine types (#150)
Dataproc 2.0 is the new default image which does not support n1-standard-1. Fixes #147, #148, #149
1 parent 806f83d commit 3343665

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

samples/snippets/create_cluster.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def create_cluster(project_id, region, cluster_name):
4747
"project_id": project_id,
4848
"cluster_name": cluster_name,
4949
"config": {
50-
"master_config": {"num_instances": 1, "machine_type_uri": "n1-standard-1"},
51-
"worker_config": {"num_instances": 2, "machine_type_uri": "n1-standard-1"},
50+
"master_config": {"num_instances": 1, "machine_type_uri": "n1-standard-2"},
51+
"worker_config": {"num_instances": 2, "machine_type_uri": "n1-standard-2"},
5252
},
5353
}
5454

samples/snippets/quickstart/quickstart.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ def quickstart(project_id, region, cluster_name, job_file_path):
4444
"project_id": project_id,
4545
"cluster_name": cluster_name,
4646
"config": {
47-
"master_config": {"num_instances": 1, "machine_type_uri": "n1-standard-1"},
48-
"worker_config": {"num_instances": 2, "machine_type_uri": "n1-standard-1"},
47+
"master_config": {"num_instances": 1, "machine_type_uri": "n1-standard-2"},
48+
"worker_config": {"num_instances": 2, "machine_type_uri": "n1-standard-2"},
4949
},
5050
}
5151

samples/snippets/submit_job_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@
3030
'config': {
3131
'master_config': {
3232
'num_instances': 1,
33-
'machine_type_uri': 'n1-standard-1'
33+
'machine_type_uri': 'n1-standard-2'
3434
},
3535
'worker_config': {
3636
'num_instances': 2,
37-
'machine_type_uri': 'n1-standard-1'
37+
'machine_type_uri': 'n1-standard-2'
3838
}
3939
}
4040
}

0 commit comments

Comments
 (0)