【发布时间】:2021-04-27 20:02:19
【问题描述】:
Apache Beam 有大量出色的文档,但我看不到为创建管道而运行的代码与工作人员运行的代码。我想我看到这段代码将运行一次,但它也会由每个启动的工作人员运行..
public static void main(String[] args) {
// Create the pipeline.
PipelineOptions options =
PipelineOptionsFactory.fromArgs(args).create();
Pipeline p = Pipeline.create(options);
// Create the PCollection 'lines' by applying a 'Read' transform.
PCollection<String> lines = p.apply(
"ReadMyFile", TextIO.read().from("gs://some/inputData.txt"));
}
【问题讨论】:
标签: google-cloud-dataflow apache-beam