taegeonum commented on a change in pull request #159: [NEMO-216,251,259] 
Support side inputs and windowing
URL: https://github.com/apache/incubator-nemo/pull/159#discussion_r234860121
 
 

 ##########
 File path: 
compiler/frontend/beam/src/main/java/org/apache/nemo/compiler/frontend/beam/transform/DoFnTransform.java
 ##########
 @@ -67,24 +62,22 @@ protected DoFn wrapDoFn(final DoFn initDoFn) {
   }
 
   @Override
-  public void onData(final WindowedValue<InputT> data) {
+  public void onData(final Object data) {
+    // Do not need any push-back logic.
     checkAndInvokeBundle();
-    getDoFnRunner().processElement(data);
-    checkAndFinishBundle();
+    final WindowedValue<InputT> mainInputElement = (WindowedValue<InputT>) 
data;
+    getDoFnRunner().processElement(mainInputElement);
+    checkAndFinishBundle(false);
   }
 
   @Override
   public void onWatermark(final Watermark watermark) {
-    checkAndInvokeBundle();
-    // TODO #216: We should consider push-back data that waits for side input
-    // TODO #216: If there are push-back data, input watermark >= output 
watermark
     getOutputCollector().emitWatermark(watermark);
-    checkAndFinishBundle();
   }
 
   @Override
   protected void beforeClose() {
-    // nothing
+    checkAndFinishBundle(true);
 
 Review comment:
   we don't need this because `AbstactDoFnTransform.close` calls `finishBundle`

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