Annotation Type DoFn.SplitRestriction


  • @Documented
    @Retention(RUNTIME)
    @Target(METHOD)
    public static @interface DoFn.SplitRestriction
    Annotation for the method that splits restriction of a splittable DoFn into multiple parts to be processed in parallel.

    This method is used to perform bulk splitting while a restriction is not actively being processed while RestrictionTracker.trySplit(double) is used to perform splitting during processing.

    Signature: void splitRestriction(<arguments>);

    This method must satisfy the following constraints:

    • If one of the arguments is of type DoFn.OutputReceiver, then it will be passed an output receiver for outputting the splits. All splits must be output through this parameter.
    • If one of its arguments is tagged with the DoFn.Element annotation, then it will be passed the current element being processed; the argument must be of type InputT. Note that automatic conversion of Rows and DoFn.FieldAccess parameters are currently unsupported.
    • If one of its arguments is tagged with the DoFn.Restriction annotation, then it will be passed the current restriction being processed; the argument must be of type RestrictionT.
    • 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 RestrictionTracker, then it will be passed a tracker that is initialized for the current DoFn.Restriction. The argument must be of the exact type RestrictionTracker<RestrictionT, PositionT>.
    • 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.