如何使用Python SDK在DataProc上为US-EAST4区域提交工作



我想在us-east4区域的Google Cloud DataProc上提交作业。我使用了以下代码,这给了我错误。

job_clnt = dataproc_v1.JobControllerClient()
project_id = self.project_id
region = cluster_region
job_clnt.submit_job(project_id, region, job)

错误是:

请求中指定的400个区域" us-east4"与端点区域"全局"不匹配。要使用" us-east4"区域,请在请求中指定'us-east4'区域并配置客户端'us-east4-dataproc.googleapis.com:443'endpoint。

tl/dr:您必须在存根上设置端点地址: configure client to use 'us-east4-dataproc.googleapis.com:443' endpoint.

这个答案可能是相关的:使用Google-Cloud-Python API访问DataProc

时,无效的区域错误

相关内容

最新更新