来自Distinct上的apache文档:Distinct<T> takes a PCollection<T> and returns a PCollection<T> that has all distinct elements of the input. Thus, each element is unique within each window.而且,如果我没有记错,除非在Dataflow 2.5.0的批处理中另外指定,否则所有元素都是同一窗口的一部分。这意味着Distinct线性流水线中的某个阶段将应用于所有元素。但是,我观察到,之后的阶段Distinct可能已经在Distinct阶段结束之前开始处理(=某些元素尚未通过)。而且,此Distinct阶段似乎只需要很少的计算能力(如在可视化console.cloud.google.com/dataflow/jobsDetail / ...上所示),这是意外的,因为在数百万个输入中查找重复项似乎很必要我的任务。所以我的问题如下:具有批处理的线性管道上的Distinct舞台确实适用于批处理的所有元素吗?我想念什么吗?管道示例:Pipeline p = Pipeline.create(options);p.apply("Stuff", ParDo.of(new Stuff()) .apply(Distinct.<String>create()) .apply("OtherStuff", ParDo.of(new OtherStuff())
添加回答
举报
0/150
提交
取消