public class PubsubIO.Write.Bound.PubsubBoundedWriter extends DoFn<T,Void>
NOTE: This is not the implementation used when running on the Google Cloud Dataflow service in streaming mode.
Public so can be suppressed by runners.
DoFn.Context, DoFn.ProcessContext, DoFn.RequiresWindowAccess| Constructor and Description |
|---|
PubsubBoundedWriter() |
| Modifier and Type | Method and Description |
|---|---|
void |
finishBundle(DoFn.Context c)
Finishes processing this batch of elements.
|
void |
populateDisplayData(DisplayData.Builder builder)
Register display data for the given transform or component.
|
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, getInputTypeDescriptor, getOutputTypeDescriptorpublic void startBundle(DoFn.Context c) throws IOException
DoFnDoFn instance for processing a batch of elements.
By default, does nothing.
startBundle in class DoFn<T,Void>IOExceptionpublic void processElement(DoFn.ProcessContext c) throws IOException
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<T,Void>IOExceptionDoFn.ProcessContextpublic void finishBundle(DoFn.Context c) throws IOException
DoFnBy default, does nothing.
finishBundle in class DoFn<T,Void>IOExceptionpublic void populateDisplayData(DisplayData.Builder builder)
DoFnpopulateDisplayData(DisplayData.Builder) is invoked by Pipeline runners to collect
display data via DisplayData.from(HasDisplayData). Implementations may call
super.populateDisplayData(builder) in order to register display data in the current
namespace, but should otherwise use subcomponent.populateDisplayData(builder) to use
the namespace of the subcomponent.
By default, does not register any display data. Implementors may override this method to provide their own display data.
populateDisplayData in interface HasDisplayDatapopulateDisplayData in class DoFn<T,Void>builder - The builder to populate with display data.HasDisplayData