eolivelli opened a new pull request #9312: URL: https://github.com/apache/pulsar/pull/9312
### Motivation pulsar-admin (PulsarAdminTool) initialises eagerly the PulsarAdmin object and some of the the underlying REST API intefaces. This initialisation process triggers lot of resource loading (like SSL/RESTAPI classes....) that slows down the JVM even for stuff that is not needed. Also there are shutdown hooks that are useless by they are executed while existing from the command. ### Modifications - Initialise as lazily as possible PulsarAdmin - Make PulsarAdminTool#main "testable" by allowing it to not call System.exit - Use halt instead of exit in order to not trigger shutdown hooks ### Verifying this change This change is a trivial rework / code cleanup, but I have added tests for parts that have been touched and had not unit tests. ---------------------------------------------------------------- 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]
