You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/12/03 22:06:33 UTC
[GitHub] [beam] amaliujia commented on a change in pull request #16012: [WIP] Nexmark: Enable Query13 for streaming mode
amaliujia commented on a change in pull request #16012:
URL: https://github.com/apache/beam/pull/16012#discussion_r762314327
##########
File path: sdks/java/testing/nexmark/src/main/java/org/apache/beam/sdk/nexmark/queries/Query13.java
##########
@@ -57,19 +57,8 @@ public Query13(NexmarkConfiguration configuration) {
final Coder<Event> coder = events.getCoder();
return events
.apply("Pair with random key", ParDo.of(new AssignShardFn<>(configuration.numKeyBuckets)))
- .apply(GroupByKey.create())
- .apply(
- "ExpandIterable",
- ParDo.of(
- new DoFn<KV<Integer, Iterable<Event>>, Event>() {
- @ProcessElement
- public void processElement(
- @Element KV<Integer, Iterable<Event>> element, OutputReceiver<Event> r) {
- for (Event value : element.getValue()) {
- r.output(value);
- }
- }
- }))
+ .apply(Reshuffle.of())
Review comment:
There was a purpose of using GBK not reshuffle.
Reshuffle is composed PTransform that uses non-standard windows, thus it lose the chance to hit some optimizations.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org