nemo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] johnyangk commented on a change in pull request #123: [NEMO-129] Support Beam's WindowedWordCount example
Date Sat, 13 Oct 2018 08:29:37 GMT
johnyangk commented on a change in pull request #123: [NEMO-129] Support Beam's WindowedWordCount
example
URL: https://github.com/apache/incubator-nemo/pull/123#discussion_r224952371
 
 

 ##########
 File path: compiler/frontend/beam/src/main/java/org/apache/nemo/compiler/frontend/beam/transform/GroupByKeyTransform.java
 ##########
 @@ -26,53 +32,172 @@
 
 /**
  * Group Beam KVs.
- * @param <I> input type.
+ * @param <K> key type.
+ * @param <InputT> input type.
  */
-public final class GroupByKeyTransform<I> implements Transform<I, WindowedValue<KV<Object,
List>>> {
+public final class GroupByKeyTransform<K, InputT>
+    extends AbstractTransform<KV<K, InputT>, KeyedWorkItem<K, InputT>, KV<K,
Iterable<InputT>>> {
   private static final Logger LOG = LoggerFactory.getLogger(GroupByKeyTransform.class.getName());
-  private final Map<Object, List> keyToValues;
-  private OutputCollector<WindowedValue<KV<Object, List>>> outputCollector;
+
+  private final SystemReduceFn reduceFn;
+  private transient TimerInternalsFactory timerInternalsFactory;
 
   /**
    * GroupByKey constructor.
    */
-  public GroupByKeyTransform() {
-    this.keyToValues = new HashMap<>();
+  public GroupByKeyTransform(final Map<TupleTag<?>, Coder<?>> outputCoders,
+                             final TupleTag<KV<K, Iterable<InputT>>> mainOutputTag,
+                             final List<TupleTag<?>> additionalOutputTags,
+                             final WindowingStrategy<?, ?> windowingStrategy,
+                             final Collection<PCollectionView<?>> sideInputs,
+                             final PipelineOptions options,
+                             final SystemReduceFn reduceFn) {
+    super(null, /* doFn */
+      null, /* inputCoder */
 
 Review comment:
   Would it be possible to use a non-null coder here?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Mime
View raw message