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

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
arithmetic1728 committed Aug 10, 2020
1 parent 34ee91c commit b8bfdf7
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 4 deletions.
16 changes: 16 additions & 0 deletions UPGRADING.md
Expand Up @@ -149,4 +149,20 @@ from google.cloud import dataproc

status = dataproc.ClusterStatus.State.CREATING
cluster = dataproc.Cluster(cluster_name="name")
```

## Path Helper Methods
The following path helper methods have been removed. Please construct the paths manually.

```py
project = 'my-project'
location = 'project-location'
region = 'project-region'
workflow_template = 'template'
autoscaling_policy = 'policy'

location_path = f'projects/{project}/locations/{location}'
region_path = f'projects/{project}/regions/{region}'
workflow_template_path = f'projects/{project}/regions/{region}/workflowTemplates/{workflow_template}'
autoscaling_policy_path = f'projects/{project}/locations/{location}/autoscalingPolicies/{autoscaling_policy}'
```
2 changes: 1 addition & 1 deletion samples/snippets/create_cluster.py
Expand Up @@ -39,7 +39,7 @@ def create_cluster(project_id, region, cluster_name):

# Create a client with the endpoint set to the desired cluster region.
cluster_client = dataproc.ClusterControllerClient(
client_options={"api_endpoint": f"{region}-dataproc.googleapis.com:443",}
client_options={"api_endpoint": f"{region}-dataproc.googleapis.com:443"}
)

# Create the cluster config.
Expand Down
6 changes: 3 additions & 3 deletions samples/snippets/quickstart/quickstart.py
Expand Up @@ -77,9 +77,9 @@ def quickstart(project_id, region, cluster_name, job_file_path):

# Termimal states for a job.
terminal_states = {
dataproc.JobStatus.ERROR,
dataproc.JobStatus.CANCELLED,
dataproc.JobStatus.DONE,
dataproc.JobStatus.State.ERROR,
dataproc.JobStatus.State.CANCELLED,
dataproc.JobStatus.State.DONE,
}

# Create a timeout such that the job gets cancelled if not in a
Expand Down

0 comments on commit b8bfdf7

Please sign in to comment.