pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] tuteng opened a new issue #3447: Running commands pulsar-admin source localrun report class java.lang.NullPointerException: null
Date Sat, 26 Jan 2019 14:54:42 GMT
tuteng opened a new issue #3447: Running commands pulsar-admin source localrun report class
java.lang.NullPointerException: null
URL: https://github.com/apache/pulsar/issues/3447
 
 
   **Describe the bug**
   Running commands pulsar-admin source localrun report class java.lang.NullPointerException:
null
   
   ```
   $ /data/pulsar/pulsar/bin/pulsar-admin source localrun
   class java.lang.NullPointerException: null
   ```
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. The latest master branch used
   2. Run pulsar-admin source localrun
   
   
   **Additional context**
   I found it was for this pull request https://github.com/apache/pulsar/pull/3429.
   In the following function setupCommands, admin is null, causing class CmdTopics initialization
failure:
   ```
   PulsarAdmin admin = adminFactory.apply(adminBuilder);
   for (Map.Entry<String, Class<?>> c : commandMap.entrySet()) {
       jcommander.addCommand(c.getKey(), c.getValue().getConstructor(PulsarAdmin.class).newInstance(admin));
   }
   ```
   In the function CmdTopics:
   ```
   super("topics", admin);
   // admin is null in the localrun mode
   topics = admin.topics();
   ```
   If constructing admin client in the localrun mode, localrun mode is useless. I don't know
if I understand it correctly. The test code is as follows https://github.com/AmateurEvents/pulsar/commit/53948980b2dedf754a60ced9cb9e383eb9c8938b.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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


With regards,
Apache Git Services

Mime
View raw message