Package org.apache.beam.sdk.fn
Class JvmInitializers
java.lang.Object
org.apache.beam.sdk.fn.JvmInitializers
Helpers for executing
JvmInitializer implementations.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidrunBeforeProcessing(PipelineOptions options) Finds all registered implementations of JvmInitializer and executes theirbeforeProcessingmethods.static voidFinds all registered implementations of JvmInitializer and executes theironStartupmethods.
-
Constructor Details
-
JvmInitializers
public JvmInitializers()
-
-
Method Details
-
runOnStartup
public static void runOnStartup()Finds all registered implementations of JvmInitializer and executes theironStartupmethods. Should be called in worker harness implementations at the very beginning of their main method. -
runBeforeProcessing
Finds all registered implementations of JvmInitializer and executes theirbeforeProcessingmethods. Should be called in worker harness implementations after initialization but before beginning to process any data.- Parameters:
options- The pipeline options passed to the worker.
-