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

submit_job_to_cluster script broken #100

Description

@TheMichaelHu

When following along https://cloud.google.com/dataproc/docs/tutorials/python-library-example using the latest version of the python client (2.0.2), I get the following error:

>>> from google.cloud.dataproc_v1.gapic.transports import cluster_controller_grpc_transport
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'google.cloud.dataproc_v1.gapic'

The snippets come from https://github.com/googleapis/python-dataproc/blob/master/samples/snippets/submit_job_to_cluster.py

Looks like in #71 the gapic directory was removed. What I had to do instead was

from google.cloud.dataproc_v1.services.cluster_controller.transports.grpc import ClusterControllerGrpcTransport

client_transport = ClusterControllerGrpcTransport(
    host='{}-dataproc.googleapis.com'.format(region)
)
cluster_client = dataproc_v1.ClusterControllerClient(transport=client_transport)

Metadata

Metadata

Assignees

Labels

api: dataprocIssues related to the googleapis/python-dataproc API.samplesIssues that are directly related to samples.type: docsImprovement to the documentation for an API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions