Class WorkerServiceLoader
java.lang.Object
org.apache.pulsar.functions.worker.service.WorkerServiceLoader
Loader to load worker service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic WorkerServiceDefinitiongetWorkerServiceDefinition(String narPath, String narExtractionDirectory) Retrieve the functions worker service definition from the provided worker service nar package.static WorkerServiceload(WorkerConfig workerConfig) Load the worker services for the given protocol list.
-
Constructor Details
-
WorkerServiceLoader
public WorkerServiceLoader()
-
-
Method Details
-
getWorkerServiceDefinition
public static WorkerServiceDefinition getWorkerServiceDefinition(String narPath, String narExtractionDirectory) throws IOException Retrieve the functions worker service definition from the provided worker service nar package.- Parameters:
narPath- the path to the worker service NAR package- Returns:
- the worker service definition
- Throws:
IOException- when fail to load the worker service or get the definition
-
load
Load the worker services for the given protocol list.- Parameters:
workerConfig- the functions worker config- Returns:
- the worker service
-