@DeveloperApi
public interface ExecutorPlugin
Modifier and Type | Method and Description |
---|---|
default void |
init(ExecutorPluginContext pluginContext)
Initialize the executor plugin.
|
default void |
shutdown()
Clean up and terminate this plugin.
|
default void init(ExecutorPluginContext pluginContext)
Each executor will, during its initialization, invoke this method on each plugin provided in the spark.executor.plugins configuration. The Spark executor will wait on the completion of the execution of the init method.
Plugins should create threads in their implementation of this method for any polling, blocking, or intensive computation.
pluginContext
- Context information for the executor where the plugin is running.default void shutdown()
This function is called during the executor shutdown phase. The executor will wait for the plugin to terminate before continuing its own shutdown.