本文整理了Java中org.apache.beam.sdk.transforms.windowing.Window.remerge()
方法的一些代码示例,展示了Window.remerge()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Window.remerge()
方法的具体详情如下:
包路径:org.apache.beam.sdk.transforms.windowing.Window
类名称:Window
方法名:remerge
[英]Creates a Window PTransform that does not change assigned windows, but will cause windows to be merged again as part of the next org.apache.beam.sdk.transforms.GroupByKey.
[中]创建一个窗口P转换,该转换不会更改分配的窗口,但会导致窗口作为下一个组织的一部分再次合并。阿帕奇。梁sdk。转变。GroupByKey。
代码示例来源:origin: org.apache.beam/beam-sdks-java-core
@Test
@Category(NeedsRunner.class)
public void testRemerge() {
List<KV<String, Integer>> ungroupedPairs = Arrays.asList();
PCollection<KV<String, Integer>> input =
p.apply(
Create.of(ungroupedPairs)
.withCoder(KvCoder.of(StringUtf8Coder.of(), BigEndianIntegerCoder.of())))
.apply(Window.into(Sessions.withGapDuration(Duration.standardMinutes(1))));
PCollection<KV<String, Iterable<Iterable<Integer>>>> middle =
input
.apply("GroupByKey", GroupByKey.create())
.apply("Remerge", Window.remerge())
.apply("GroupByKeyAgain", GroupByKey.create())
.apply("RemergeAgain", Window.remerge());
p.run();
Assert.assertTrue(
middle
.getWindowingStrategy()
.getWindowFn()
.isCompatible(Sessions.withGapDuration(Duration.standardMinutes(1))));
}
代码示例来源:origin: org.apache.beam/beam-sdks-java-core
.apply(Window.remerge())
.setWindowingStrategyInternal(input.getWindowingStrategy());
PCollection<KV<K, InputOrAccum<InputT, AccumT>>> preprocessedCold =
内容来源于网络,如有侵权,请联系作者删除!