seojangho commented on a change in pull request #2: [NEMO-7] Intra-TaskGroup 
pipelining
URL: https://github.com/apache/incubator-nemo/pull/2#discussion_r172762472
 
 

 ##########
 File path: 
compiler/frontend/spark/src/main/java/edu/snu/nemo/compiler/frontend/spark/transform/GroupByKeyTransform.java
 ##########
 @@ -38,22 +38,23 @@ public GroupByKeyTransform() {
   }
 
   @Override
-  public void prepare(final Transform.Context context, final 
OutputCollector<Tuple2<K, Iterable<V>>> outputCollector) {
-    this.oc = outputCollector;
+  public void prepare(final Transform.Context context, final Pipe<Tuple2<K, 
Iterable<V>>> p) {
+    this.pipe = p;
   }
 
   @Override
-  public void onData(final Iterator<Tuple2<K, V>> elements, final String 
srcVertexId) {
-    elements.forEachRemaining(element -> {
-      keyToValues.putIfAbsent(element._1, new ArrayList<>());
-      keyToValues.get(element._1).add(element._2);
-    });
+  public void onData(final Object element) {
+    K key = ((Tuple2<K, V>) element)._1;
 
 Review comment:
   Add `final` modifier?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to