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 #122: [NEMO-213] Use Beam's DoFnRunners to execute DoFn
Date Tue, 09 Oct 2018 11:46:10 GMT
johnyangk commented on a change in pull request #122: [NEMO-213] Use Beam's DoFnRunners to
execute DoFn
URL: https://github.com/apache/incubator-nemo/pull/122#discussion_r223660368
 
 

 ##########
 File path: compiler/frontend/beam/src/main/java/org/apache/nemo/compiler/frontend/beam/transform/GroupByKeyTransform.java
 ##########
 @@ -40,23 +41,27 @@ public GroupByKeyTransform() {
   }
 
   @Override
-  public void prepare(final Context context, final OutputCollector<KV<Object, List>>
oc) {
+  public void prepare(final Context context, final OutputCollector<WindowedValue<KV<Object,
List>>> oc) {
     this.outputCollector = oc;
   }
 
   @Override
   public void onData(final I element) {
-    final KV kv = (KV) element;
+    // TODO #: support window in group by key
+    final WindowedValue<KV> windowedValue = (WindowedValue<KV>) element;
+    final KV kv = windowedValue.getValue();
     keyToValues.putIfAbsent(kv.getKey(), new ArrayList());
     keyToValues.get(kv.getKey()).add(kv.getValue());
   }
 
   @Override
   public void close() {
+    // TODO #: support window in group by key
 
 Review comment:
   Ditto.

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