Class PulsarWorkerService
java.lang.Object
org.apache.pulsar.functions.worker.PulsarWorkerService
- All Implemented Interfaces:
WorkerService
A service component contains everything to run a worker except rest server.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgenerateFunctionsStats(org.apache.pulsar.common.util.SimpleTextOutputStream out) Generate functions stats.voidinit(WorkerConfig workerConfig, URI dlogUri, boolean runAsStandalone) voidinitAsStandalone(WorkerConfig workerConfig) Initialize the worker API service using the provided config.voidinitInBroker(ServiceConfiguration brokerConfig, WorkerConfig workerConfig, PulsarResources pulsarResources, org.apache.pulsar.common.conf.InternalConfigurationData internalConf) Initialize the worker service in broker.voidstart(AuthenticationService authenticationService, AuthorizationService authorizationService, ErrorNotifier errorNotifier) Start the worker API service.voidstop()Stop the worker API service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.functions.worker.WorkerService
getFunctions, getFunctionsV2, getSinks, getSources, getWorkerConfig, getWorkers, isInitialized
-
Constructor Details
-
PulsarWorkerService
public PulsarWorkerService() -
PulsarWorkerService
-
-
Method Details
-
generateFunctionsStats
public void generateFunctionsStats(org.apache.pulsar.common.util.SimpleTextOutputStream out) Description copied from interface:WorkerServiceGenerate functions stats.- Specified by:
generateFunctionsStatsin interfaceWorkerService- Parameters:
out- output stream
-
init
-
initAsStandalone
Description copied from interface:WorkerServiceInitialize the worker API service using the provided config.- Specified by:
initAsStandalonein interfaceWorkerService- 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:WorkerServiceInitialize the worker service in broker.- Specified by:
initInBrokerin interfaceWorkerService- Parameters:
brokerConfig- broker configworkerConfig- worker configpulsarResources- configuration metadata-storeinternalConf- 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:WorkerServiceStart the worker API service.- Specified by:
startin interfaceWorkerService- 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:WorkerServiceStop the worker API service.- Specified by:
stopin interfaceWorkerService
-