Interface WorkerService

All Known Implementing Classes:
PulsarWorkerService, WorkerServiceWithClassLoader

public interface WorkerService
API service provides the ability to manage functions.
  • Method Details

    • getWorkerConfig

      WorkerConfig getWorkerConfig()
      Return the worker config.
      Returns:
      worker config
    • initAsStandalone

      void initAsStandalone(WorkerConfig workerConfig) throws Exception
      Initialize the worker API service using the provided config.
      Parameters:
      workerConfig - the worker config
      Throws:
      Exception - when fail to initialize the worker API service.
    • initInBroker

      void initInBroker(ServiceConfiguration brokerConfig, WorkerConfig workerConfig, PulsarResources pulsarResources, org.apache.pulsar.common.conf.InternalConfigurationData internalConf) throws Exception
      Initialize the worker service in broker.
      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

      void start(AuthenticationService authenticationService, AuthorizationService authorizationService, ErrorNotifier errorNotifier) throws Exception
      Start the worker API service.
      Parameters:
      authenticationService - the authentication service.
      authorizationService - the authorization service.
      errorNotifier - error notifier.
      Throws:
      Exception - when fail to start the worker API service.
    • stop

      void stop()
      Stop the worker API service.
    • isInitialized

      boolean isInitialized()
      Check if the worker service is initialized or not.
      Returns:
      true if the worker service is initialized otherwise false.
    • getFunctions

      Functions<? extends WorkerService> getFunctions()
      Get the functions service.
      Returns:
      the functions service.
    • getFunctionsV2

      FunctionsV2<? extends WorkerService> getFunctionsV2()
      Get the functions service (v2).

      This is a legacy API service for supporting v2.

      Returns:
      the functions service (v2).
    • getSinks

      Sinks<? extends WorkerService> getSinks()
      Get the sinks service.
      Returns:
      the sinks service.
    • getSources

      Sources<? extends WorkerService> getSources()
      Get the sources service.
      Returns:
      the sources service.
    • getWorkers

      Workers<? extends WorkerService> getWorkers()
      Get the worker service.
      Returns:
      the worker service.
    • generateFunctionsStats

      void generateFunctionsStats(org.apache.pulsar.common.util.SimpleTextOutputStream out)
      Generate functions stats.
      Parameters:
      out - output stream