kennknowles commented on a change in pull request #14155:
URL: https://github.com/apache/beam/pull/14155#discussion_r596201351
##########
File path: sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/DoFn.java
##########
@@ -91,6 +91,16 @@
*/
public abstract class DoFn<InputT extends @Nullable Object, OutputT extends
@Nullable Object>
implements Serializable, HasDisplayData {
+ /** Information accessible while within the {@link Setup} method. */
+ @SuppressWarnings("ClassCanBeStatic") // Converting class to static is an
API change.
+ public abstract class SetupContext {
Review comment:
I mean you would call `invokeSetup` with an `ArgumentProvider` that
provides the options (this already exists). Then the job of the invoker
(generated bytecode) is to pass the right arguments to the DoFn.
Basically: no more contexts passed to annotation-style `DoFn`s. In fact, we
should deprecate the existing ones. Instead, `ArgumentProvider` is basically
the same thing, but only passed to `DoFnInvoker` and the invoker passes just
the arguments needed to the `DoFn`.
----------------------------------------------------------------
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]