jerrypeng opened a new pull request #7528:
URL: https://github.com/apache/pulsar/pull/7528


   
   
   ### Motivation
   
   There was a backwards compatibility breakage introduced in:
   
   https://github.com/apache/pulsar/pull/5985
   
   If running function workers separately from brokers, updating workers and 
brokers independently from 2.5 to 2.6 will cause the following error:
   
   `java.lang.NullPointerException: null\n\tat 
java.net.URI$Parser.parse(URI.java:3104) ~[?:?]\n\tat 
java.net.URI.<init>(URI.java:600) ~[?:?]\n\tat 
java.net.URI.create(URI.java:881) ~[?:?]\n\tat 
org.apache.pulsar.functions.worker.WorkerUtils.initializeDlogNamespace(WorkerUtils.java:160)
 
~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n\tat
 org.apache.pulsar.functions.worker.Worker.initialize(Worker.java:155) 
~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n\tat
 org.apache.pulsar.functions.worker.Worker.start(Worker.java:69) 
~[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n\tat
 
org.apache.pulsar.functions.worker.FunctionWorkerStarter.main(FunctionWorkerStarter.java:67)
 
[org.apache.pulsar-pulsar-functions-worker-2.7.0-SNAPSHOT.jar:2.7.0-SNAPSHOT]\n`
   
   This is because a 2.5 broker will response will have 
"bookkeeperMetadataServiceUri" and the admin client will return the field as 
null:
   
   
`InternalConfigurationData{zookeeperServers=zookeeper-dev-0.zookeeper-dev:2181,zookeeper-dev-1.zookeeper-dev:2181,zookeeper-dev-2.zookeeper-dev:2181,
 
configurationStoreServers=zookeeper-dev-0.zookeeper-dev:2181,zookeeper-dev-1.zookeeper-dev:2181,zookeeper-dev-2.zookeeper-dev:2181,
 ledgersRootPath=/ledgers, bookkeeperMetadataServiceUri=null, 
stateStorageServiceUrl=null}`
   
   Thus causing the NPE
   


----------------------------------------------------------------
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]


Reply via email to