You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2020/05/22 13:45:14 UTC

[GitHub] [bookkeeper] coolbeevip opened a new issue #2345: Is it possible to automatically check zookeeper and create bookkeeper metadata when starting bookkeeper?

coolbeevip opened a new issue #2345:
URL: https://github.com/apache/bookkeeper/issues/2345


   [main:ZKRegistrationManager@379] - BookKeeper metadata doesn't exist in zookeeper. Has the cluster been initialized? Try running bin/bookkeeper shell metaformat


----------------------------------------------------------------
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] [bookkeeper] coolbeevip commented on issue #2345: Is it possible to automatically check zookeeper and create bookkeeper metadata when starting bookkeeper?

Posted by GitBox <gi...@apache.org>.
coolbeevip commented on issue #2345:
URL: https://github.com/apache/bookkeeper/issues/2345#issuecomment-632713378


   Why not use BookkeeperAdmin in ZKRegistrationManager to automatically initialize the cluster, Any explanation for that?
   
   ```
       @Override
       public String getClusterInstanceId() throws BookieException {
           String instanceId = null;
           try {
               if (zk.exists(ledgersRootPath, null) == null) {
                   try {
                       BookKeeperAdmin.initNewCluster(conf);
                   } catch (Exception e) {
                       log.error("BookKeeper metadata doesn't exist in zookeeper. "
                           + "Has the cluster been initialized? "
                           + "Try running bin/bookkeeper shell metaformat");
                       throw new KeeperException.NoNodeException("BookKeeper metadata");
                   }
               }
   ```


----------------------------------------------------------------
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] [bookkeeper] eolivelli commented on issue #2345: Is it possible to automatically check zookeeper and create bookkeeper metadata when starting bookkeeper?

Posted by GitBox <gi...@apache.org>.
eolivelli commented on issue #2345:
URL: https://github.com/apache/bookkeeper/issues/2345#issuecomment-632698886


   You can use BookkeeperAdmin class.
   It has a meta format method that does nothing if the cluster has already been initialized


----------------------------------------------------------------
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] [bookkeeper] sijie commented on issue #2345: Is it possible to automatically check zookeeper and create bookkeeper metadata when starting bookkeeper?

Posted by GitBox <gi...@apache.org>.
sijie commented on issue #2345:
URL: https://github.com/apache/bookkeeper/issues/2345#issuecomment-633337188


   @coolbeevip adding initialization or format code into every bookie process is not a good idea. since every bookie will attempt to initialize or reformat the metadata. This usually would introduce many consistency problems. So we recommend administrators to initialize the metadata when setting up the cluster.


----------------------------------------------------------------
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] [bookkeeper] coolbeevip commented on issue #2345: Is it possible to automatically check zookeeper and create bookkeeper metadata when starting bookkeeper?

Posted by GitBox <gi...@apache.org>.
coolbeevip commented on issue #2345:
URL: https://github.com/apache/bookkeeper/issues/2345#issuecomment-633338616


   > @coolbeevip adding initialization or format code into every bookie process is not a good idea. since every bookie will attempt to initialize or reformat the metadata. This usually would introduce many consistency problems. So we recommend administrators to initialize the metadata when setting up the cluster.
   
   Thank you for your reply


----------------------------------------------------------------
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] [bookkeeper] coolbeevip closed issue #2345: Is it possible to automatically check zookeeper and create bookkeeper metadata when starting bookkeeper?

Posted by GitBox <gi...@apache.org>.
coolbeevip closed issue #2345:
URL: https://github.com/apache/bookkeeper/issues/2345


   


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