如何在欧洲使用Cloud Dataflow区域端点? [英] How do I use the Cloud Dataflow Regional Endpoint in Europe?
问题描述
是否可以将Google Cloud Platform Dataflow作业的区域更改为欧洲?
我已将管道的区域设置为europe-west1-d
,但无法更改到作业本身的区域.
我试图在管道选项中更改区域,但这会导致错误,并且只有默认区域在起作用.
pipeline_options.view_as(GoogleCloudOptions).region = 'europe-west1'
"error": {
"code": 400,
"message": "(ff50231266257fc7): The workflow could not be created, since it was sent to an invalid or unreleased region. Please resubmit with a valid region.",
"status": "INVALID_ARGUMENT"
}
使用命令gcloud compute regions list
europe-west1
使用datafkow sdk 2.1.0,您可以执行此操作.
您可以使用
pipelineOptions.setWorkerMachineType(pipelineConfigProperties.get("worker.machine.type"));
pipelineOptions.setNetwork("dataflow.network");
pipelineOptions.setUsePublicIps(false);
pipelineOptions.setZone("dataflow.zone");
pipelineOptions.setSubnetwork("dataflow.subnetwork");
pipelineOptions.setRegion("dataflow.region");
这已经过测试,您肯定会在2.1.0版中完成
Is it possible to change the region of a Google Cloud Platform Dataflow job to Europe?
I have set zone of the pipeline to europe-west1-d
but I am unable to change to region of the job itself.
I have tried to change the region in the pipeline options, but that results in an error and only the default region is working.
pipeline_options.view_as(GoogleCloudOptions).region = 'europe-west1'
"error": {
"code": 400,
"message": "(ff50231266257fc7): The workflow could not be created, since it was sent to an invalid or unreleased region. Please resubmit with a valid region.",
"status": "INVALID_ARGUMENT"
}
europe-west1
is listed when using the command gcloud compute regions list
With datafkow sdk 2.1.0 you can do this.
You can use
pipelineOptions.setWorkerMachineType(pipelineConfigProperties.get("worker.machine.type"));
pipelineOptions.setNetwork("dataflow.network");
pipelineOptions.setUsePublicIps(false);
pipelineOptions.setZone("dataflow.zone");
pipelineOptions.setSubnetwork("dataflow.subnetwork");
pipelineOptions.setRegion("dataflow.region");
This is tested and you definitely do this in 2.1.0
这篇关于如何在欧洲使用Cloud Dataflow区域端点?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!