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 2020/12/02 19:38:47 UTC

[GitHub] [beam] reuvenlax commented on a change in pull request #13318: Improve Nexmark performance:

reuvenlax commented on a change in pull request #13318:
URL: https://github.com/apache/beam/pull/13318#discussion_r534432052



##########
File path: sdks/java/testing/nexmark/src/main/java/org/apache/beam/sdk/nexmark/queries/Query5.java
##########
@@ -53,6 +63,79 @@
 public class Query5 extends NexmarkQueryTransform<AuctionCount> {
   private final NexmarkConfiguration configuration;
 
+  public static class TopCombineFn
+      extends AccumulatingCombineFn<KV<Long, Long>, Accum, KV<Long, List<Long>>> {
+    @Override
+    public Accum createAccumulator() {
+      return new Accum();
+    }
+
+    @Override
+    public Coder<Accum> getAccumulatorCoder(
+        @NonNull CoderRegistry registry, @NonNull Coder<KV<Long, Long>> inputCoder) {
+      JavaFieldSchema provider = new JavaFieldSchema();
+      TypeDescriptor<Accum> typeDescriptor = new TypeDescriptor<Accum>() {};
+      provider.schemaFor(typeDescriptor);

Review comment:
       why do you call schemaFor twice?




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org