@Documented @Retention(value=RUNTIME) @Target(value=METHOD) @Experimental(value=SPLITTABLE_DO_FN) public static @interface DoFn.GetSize
Signature: double getSize(<arguments>);
This method must satisfy the following constraints:
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 Row
s and DoFn.FieldAccess
parameters are
currently unsupported.
DoFn.Restriction
annotation, then it will
be passed the current restriction being processed; the argument must be of type RestrictionT
.
DoFn.Timestamp
annotation, then it will be
passed the timestamp of the current element being processed; the argument must be of type
Instant
.
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>
.
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.
PaneInfo
, then it will be passed information
about the current triggering pane.
PipelineOptions
, then it will be passed the
options for the current pipeline.
Returns a double representing the size of the current element and restriction.
Splittable DoFn
s should only provide this method if the default implementation
within the RestrictionTracker
is an inaccurate representation of known work.
It is up to each splittable to convert between their natural representation of outstanding work and this representation. For example:
message bytes
that have not been processed.