Uploaded image for project: 'Beam'
  1. Beam
  2. BEAM-11927

Parameter should be used instead of argument in the Annotation Type DoFn.ProcessElement documentation

Details

    • Bug
    • Status: Triage Needed
    • P3
    • Resolution: Unresolved
    • 2.28.0
    • None
    • beam-community
    • None

    Description

      In the Javadoc of Annotation Type DoFn.ProcessElement published here

      https://beam.apache.org/releases/javadoc/2.28.0/org/apache/beam/sdk/transforms/DoFn.ProcessElement.html

      contains the text below.

      Red instances of the arguments word should be replaced with the parameters one. The reason is that the text speaks about the method signature and its parameters (that is formal parameters) while arguments are actual parameters.

       

      If any of the arguments is a RestrictionTracker then see the specifications below about splittable DoFn, otherwise this method must satisfy the following constraints:

      • If one of its arguments is tagged with the DoFn.Element annotation, then it will be passed the current element being processed. The argument type must match the input type of this DoFn exactly, or both types must have equivalent schemas registered.
      • If one of its arguments is tagged with the DoFn.Timestamp annotation, then it will be passed the timestamp of the current element being processed; the argument must be of type Instant.
      • If one of its arguments is a subtype of BoundedWindow, then it will be passed the window of the current element. When applied by ParDo the subtype of BoundedWindow must match the type of windows on the input PCollection. If the window is not accessed a runner may perform additional optimizations.
      • If one of its arguments is of type PaneInfo, then it will be passed information about the current triggering pane.
      • If one of the parameters is of type PipelineOptions, then it will be passed the options for the current pipeline.
      • If one of the parameters is of type DoFn.OutputReceiver, then it will be passed an output receiver for outputting elements to the default output.
      • If one of the parameters is of type DoFn.MultiOutputReceiver, then it will be passed an output receiver for outputting to multiple tagged outputs.
      • If one of the parameters is of type DoFn.BundleFinalizer, then it will be passed a mechanism to register a callback that will be invoked after the runner successfully commits the output of this bundle. See Apache Beam Portability API: How to Finalize Bundles for further details.
      • It must return void.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dcremonini Daniele Cremonini
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: