【发布时间】:2018-04-28 04:50:47
【问题描述】:
在 App Engine 数据流作业中使用数据流 API 启动时,我必须将参数传递给模板。
com.google.api.services.dataflow.Dataflow.Projects.Locations.Templates.Launch request1 =
dataflowService.projects().locations().templates().launch(projectId,"us-central1",null);
request1.setGcsPath(template);
request1.setLocation("us-central1");
request1.setValidateOnly(false);
//Storing launch Response
LaunchTemplateResponse response1 = request1.execute();
在我的代码中,我能够设置 GCS 路径、位置和有效性,但不能像在云函数中那样设置参数。是使用 java 设置参数的任何方法吗?因为在 Python 中它是可能的,所以我认为在 Java 中也是如此。
【问题讨论】:
-
您能否详细说明“在云函数中设置参数”是什么意思?您应该能够为您的模板设置所有参数,就像 gcs 路径等。
-
忽略上面的问题,我想我知道你在问什么。刚刚查了一下 API。
标签: java google-app-engine google-cloud-platform google-cloud-dataflow apache-beam