golden-yang commented on issue #9633:
URL: https://github.com/apache/pulsar/issues/9633#issuecomment-786360458
yes, this NullPointerException is related to
`org.apache.pulsar.functions.worker.WorkerService`. When we set
`functionsWorkerEnabled=false`,
`org.apache.pulsar.broker.PulsarService#getWorkerService` method will get a
'null', and no parameter verification has been done wherever it is used(This
method is cited in eight places, They all have NullPointerException problems).
Perhaps we should not allow this function to return a null value. May be we
should directly throw an exception that does not support this function_worker
function.
` public WorkerService getWorkerService() {
return functionWorkerService.orElse(null);
}
`
Please take a look. If this solution is OK, I will propose a PR to fix it.
@eolivelli Thanks.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]