kennknowles commented on a change in pull request #13781:
URL: https://github.com/apache/beam/pull/13781#discussion_r575425635
##########
File path:
runners/direct-java/src/main/java/org/apache/beam/runners/direct/MultiStepCombine.java
##########
@@ -472,6 +474,7 @@ public MergeAccumulatorsAndExtractOutputEvaluator(
ctxt.createBundle(
(PCollection<KV<K, OutputT>>)
Iterables.getOnlyElement(application.getOutputs().values()));
+ combineFn.setup();
Review comment:
I would prefer to not do real work in a constructor. Can this be done
with lazy init in processElement?
Have you taken a look at how DoFn setup and teardown are managed with a
loading cache in the directrunner?
##########
File path:
runners/flink/src/main/java/org/apache/beam/runners/flink/translation/functions/AbstractFlinkCombineRunner.java
##########
@@ -81,6 +81,16 @@ OutputT extractOutput(
PipelineOptions options,
SideInputReader sideInputReader,
Collection<? extends BoundedWindow> windows);
+
+ default void setup(
Review comment:
This seems like maybe it would leave out places where these should be
called.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]