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_r223659672
##########
File path:
compiler/frontend/beam/src/main/java/org/apache/nemo/compiler/frontend/beam/transform/CreateViewTransform.java
##########
@@ -48,23 +49,22 @@ public CreateViewTransform(final PCollectionView<O>
pCollectionView) {
}
@Override
- public void prepare(final Context context, final OutputCollector<O> oc) {
+ public void prepare(final Context context, final
OutputCollector<WindowedValue<O>> oc) {
this.outputCollector = oc;
}
@Override
- public void onData(final I element) {
- // Since CreateViewTransform takes KV(Void, value), this is okay
- if (element instanceof KV) {
- final KV<?, ?> kv = (KV<?, ?>) element;
- multiView.getDataList().add(kv.getValue());
- }
+ public void onData(final WindowedValue<I> element) {
+ // TODO #: support window in view
+ final KV kv = ((WindowedValue<KV>) element).getValue();
+ multiView.getDataList().add(kv.getValue());
}
@Override
public void close() {
final Object view = viewFn.apply(multiView);
- outputCollector.emit((O) view);
+ // TODO #: support window in view
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:
[email protected]
With regards,
Apache Git Services