【发布时间】:2017-06-21 16:57:13
【问题描述】:
Dataflow 1.9 曾经有 TemplatingDataflowPipelineRunner,但 Beam 没有。使用 Beam 2.0 Java SDK 创建 Dataflow 模板管道的步骤是什么?
【问题讨论】:
标签: templates google-cloud-dataflow apache-beam
Dataflow 1.9 曾经有 TemplatingDataflowPipelineRunner,但 Beam 没有。使用 Beam 2.0 Java SDK 创建 Dataflow 模板管道的步骤是什么?
【问题讨论】:
标签: templates google-cloud-dataflow apache-beam
从 Beam 2.0 开始,使用 DataflowRunner 并指定 --templateLocation:
mvn compile exec:java \
-Dexec.mainClass=com.example.myclass \
-Dexec.args="--runner=DataflowRunner \
--project=[YOUR_PROJECT_ID] \
--stagingLocation=gs://[YOUR_BUCKET_NAME]/staging \
--output=gs://[YOUR_BUCKET_NAME]/output \
--templateLocation=gs://[YOUR_BUCKET_NAME]/templates/MyTemplate"
请注意,--templateLocation 替换了之前的 --dataflowJobFile。
请参阅Creating and staging templates 上的 Dataflow 文档以了解 Java SDK 2.X
【讨论】: