You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/03/17 16:29:03 UTC

[GitHub] [beam] xinyuiscool commented on a change in pull request #14155: [BEAM-11914] Add PipelineOptions as DoFn @Setup parameters

xinyuiscool commented on a change in pull request #14155:
URL: https://github.com/apache/beam/pull/14155#discussion_r596186441



##########
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:
       You mean we call invokeSetup() directly with PipelineOptions? I thought we always define a context for invoking the methods in DoFn, so we can add more parameters if needed in the future (like StartBundleContext, which only has pipelineOptions inside). If this not needed, I will go ahead and remove this context.




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