InputT - the type of the (main) input elementsOutputT - the type of the (main) output elementspublic static class IntraBundleParallelization.MultiThreadedIntraBundleProcessingDoFn<InputT,OutputT> extends DoFn<InputT,OutputT>
DoFn wrapper.DoFn.Context, DoFn.ProcessContext, DoFn.RequiresWindowAccess| Constructor and Description |
|---|
MultiThreadedIntraBundleProcessingDoFn(DoFn<InputT,OutputT> doFn,
int maxParallelism) |
| Modifier and Type | Method and Description |
|---|---|
void |
finishBundle(DoFn.Context c)
Finishes processing this batch of elements.
|
protected TypeDescriptor<InputT> |
getInputTypeDescriptor()
Returns a
TypeDescriptor capturing what is known statically
about the input type of this DoFn instance's most-derived
class. |
protected TypeDescriptor<OutputT> |
getOutputTypeDescriptor()
Returns a
TypeDescriptor capturing what is known statically
about the output type of this DoFn instance's
most-derived class. |
void |
processElement(DoFn.ProcessContext c)
Processes one input element.
|
void |
startBundle(DoFn.Context c)
Prepares this
DoFn instance for processing a batch of elements. |
createAggregator, createAggregator, getAllowedTimestampSkew, populateDisplayDatapublic void startBundle(DoFn.Context c) throws Exception
DoFnDoFn instance for processing a batch of elements.
By default, does nothing.
startBundle in class DoFn<InputT,OutputT>Exceptionpublic void processElement(DoFn.ProcessContext c) throws Exception
DoFnThe current element of the input PCollection is returned by
c.element(). It should be considered immutable. The Dataflow
runtime will not mutate the element, so it is safe to cache, etc. The element should not be
mutated by any of the DoFn methods, because it may be cached elsewhere, retained by the
Dataflow runtime, or used in other unspecified ways.
A value is added to the main output PCollection by DoFn.Context.output(OutputT).
Once passed to output the element should be considered immutable and not be modified in
any way. It may be cached elsewhere, retained by the Dataflow runtime, or used in other
unspecified ways.
processElement in class DoFn<InputT,OutputT>ExceptionDoFn.ProcessContextpublic void finishBundle(DoFn.Context c) throws Exception
DoFnBy default, does nothing.
finishBundle in class DoFn<InputT,OutputT>Exceptionprotected TypeDescriptor<InputT> getInputTypeDescriptor()
DoFnTypeDescriptor capturing what is known statically
about the input type of this DoFn instance's most-derived
class.
See DoFn.getOutputTypeDescriptor() for more discussion.
getInputTypeDescriptor in class DoFn<InputT,OutputT>protected TypeDescriptor<OutputT> getOutputTypeDescriptor()
DoFnTypeDescriptor capturing what is known statically
about the output type of this DoFn instance's
most-derived class.
In the normal case of a concrete DoFn subclass with
no generic type parameters of its own (including anonymous inner
classes), this will be a complete non-generic type, which is good
for choosing a default output Coder<OutputT> for the output
PCollection<OutputT>.
getOutputTypeDescriptor in class DoFn<InputT,OutputT>