You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/02/19 14:09:23 UTC
[GitHub] [pulsar] eolivelli opened a new issue #9633: Pulsar Admin: functions - NullPointerException in case of disabled Pulsar Functions
eolivelli opened a new issue #9633:
URL: https://github.com/apache/pulsar/issues/9633
**Describe the bug**
I see this NullPointerException on the broker logs while issuing "`pulsar-admin sinks available-sink`"
I have `functionsWorkerEnabled=false` in _broker.conf_
```
java.lang.NullPointerException │
│ pulsar-broker at org.apache.pulsar.broker.admin.impl.SinksBase.sinks(SinksBase.java:53) ~[org.apache.pulsar-pulsar-broker-2.8.0-SNAPSHOT.jar:2.8.0-SNAPSHOT] │
│ pulsar-broker at org.apache.pulsar.broker.admin.impl.SinksBase.getSinkList(SinksBase.java:522) ~[org.apache.pulsar-pulsar-broker-2.8.0-SNAPSHOT.jar:2.8.0-SNAPSHOT]
```
We should return a more user friendly error that explain the problem.
Tested on current master on 2.8.0-SNAPSHOT
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [pulsar] golden-yang commented on issue #9633: Pulsar Admin: functions - NullPointerException in case of disabled Pulsar Functions
Posted by GitBox <gi...@apache.org>.
golden-yang commented on issue #9633:
URL: https://github.com/apache/pulsar/issues/9633#issuecomment-786494108
Yes.This is what i want to say.
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [pulsar] codelipenghui closed issue #9633: Pulsar Admin: functions - NullPointerException in case of disabled Pulsar Functions
Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #9633:
URL: https://github.com/apache/pulsar/issues/9633
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [pulsar] golden-yang commented on issue #9633: Pulsar Admin: functions - NullPointerException in case of disabled Pulsar Functions
Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org
[GitHub] [pulsar] eolivelli commented on issue #9633: Pulsar Admin: functions - NullPointerException in case of disabled Pulsar Functions
Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #9633:
URL: https://github.com/apache/pulsar/issues/9633#issuecomment-786472168
@golden-yang thanks for picking this up
Probably we could simply throw an exception
`public WorkerService getWorkerService() { return functionWorkerService.orElseThrow(....); }`
----------------------------------------------------------------
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:
users@infra.apache.org
[GitHub] [pulsar] golden-yang edited a comment on issue #9633: Pulsar Admin: functions - NullPointerException in case of disabled Pulsar Functions
Posted by GitBox <gi...@apache.org>.
golden-yang edited a comment on issue #9633:
URL: https://github.com/apache/pulsar/issues/9633#issuecomment-786494108
Yes.This is what i want to say.
@eolivelli
----------------------------------------------------------------
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:
users@infra.apache.org