What is the difference between DoFn.Setup and DoFn.StartBundle?

The lifecycle of a DoFn is as follows: Setup Repeatedly process bundles: StartBundle Repeated ProcessElement FinishBundle Teardown I.e. one instance of a DoFn can process many (zero or more) bundles, and within one bundle, it processes many (zero or more) elements. Both Setup/Teardown and StartBundle/FinishBundle are optional – it is possible to implement any DoFn … Read more