Class WorkerServiceLoader


  • public class WorkerServiceLoader
    extends java.lang.Object
    Loader to load worker service.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static WorkerServiceDefinition getWorkerServiceDefinition​(java.lang.String narPath, java.lang.String narExtractionDirectory)
      Retrieve the functions worker service definition from the provided worker service nar package.
      static WorkerService load​(org.apache.pulsar.functions.worker.WorkerConfig workerConfig)
      Load the worker services for the given protocol list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WorkerServiceLoader

        public WorkerServiceLoader()
    • Method Detail

      • getWorkerServiceDefinition

        public static WorkerServiceDefinition getWorkerServiceDefinition​(java.lang.String narPath,
                                                                         java.lang.String narExtractionDirectory)
                                                                  throws java.io.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:
        java.io.IOException - when fail to load the worker service or get the definition
      • load

        public static WorkerService load​(org.apache.pulsar.functions.worker.WorkerConfig workerConfig)
        Load the worker services for the given protocol list.
        Parameters:
        workerConfig - the functions worker config
        Returns:
        the worker service