Class PulsarWorkerService

java.lang.Object
org.apache.pulsar.functions.worker.PulsarWorkerService
All Implemented Interfaces:
WorkerService

public class PulsarWorkerService extends Object implements WorkerService
A service component contains everything to run a worker except rest server.
  • Constructor Details

  • Method Details

    • generateFunctionsStats

      public void generateFunctionsStats(org.apache.pulsar.common.util.SimpleTextOutputStream out)
      Description copied from interface: WorkerService
      Generate functions stats.
      Specified by:
      generateFunctionsStats in interface WorkerService
      Parameters:
      out - output stream
    • init

      public void init(WorkerConfig workerConfig, URI dlogUri, boolean runAsStandalone)
    • initAsStandalone

      public void initAsStandalone(WorkerConfig workerConfig) throws Exception
      Description copied from interface: WorkerService
      Initialize the worker API service using the provided config.
      Specified by:
      initAsStandalone in interface WorkerService
      Parameters:
      workerConfig - the worker config
      Throws:
      Exception - when fail to initialize the worker API service.
    • initInBroker

      public void initInBroker(ServiceConfiguration brokerConfig, WorkerConfig workerConfig, PulsarResources pulsarResources, org.apache.pulsar.common.conf.InternalConfigurationData internalConf) throws Exception
      Description copied from interface: WorkerService
      Initialize the worker service in broker.
      Specified by:
      initInBroker in interface WorkerService
      Parameters:
      brokerConfig - broker config
      workerConfig - worker config
      pulsarResources - configuration metadata-store
      internalConf - pulsar internal configuration data
      Throws:
      Exception - when failed to initialize the worker service in broker.
    • start

      public void start(AuthenticationService authenticationService, AuthorizationService authorizationService, ErrorNotifier errorNotifier) throws Exception
      Description copied from interface: WorkerService
      Start the worker API service.
      Specified by:
      start in interface WorkerService
      Parameters:
      authenticationService - the authentication service.
      authorizationService - the authorization service.
      errorNotifier - error notifier.
      Throws:
      Exception - when fail to start the worker API service.
    • stop

      public void stop()
      Description copied from interface: WorkerService
      Stop the worker API service.
      Specified by:
      stop in interface WorkerService