You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2022/12/22 02:39:36 UTC

[GitHub] [bookkeeper] dlg99 opened a new pull request, #3710: [feature] Added api/v1/bookie/cluster_info REST API

dlg99 opened a new pull request, #3710:
URL: https://github.com/apache/bookkeeper/pull/3710

   Descriptions of the changes in this PR:
   
   ### Motivation
   
   Information provided by current REST API is not enough (and cumbersome to combine) to answer such question as "is any data in danger if I shut down one more bookie".
   E.g. getting list of underreplicated ledgers can get some info but it is either fast (no ledgers) or can be super slow on large cluster with some bookies lost (it retrieves full list of ledgers).
   Even if there are no UR ledgers it still possible that the problem is that Auditor is down etc.
   
   ### Changes
   
    Added api/v1/bookie/cluster_info REST API
   
   ```
   curl -s 127.0.0.1:8080/api/v1/bookie/cluster_info
   {
     "auditorElected" : false,
     "auditorId" : "",
     "clusterUnderReplicated" : false,
     "ledgerReplicationEnabled" : true,
     "totalBookiesCount" : 1,
     "writableBookiesCount" : 1,
     "readonlyBookiesCount" : 0,
     "unavailableBookiesCount" : 0
   }%
   ```
   
   > ---
   > In order to uphold a high standard for quality for code contributions, Apache BookKeeper runs various precommit
   > checks for pull requests. A pull request can only be merged when it passes precommit checks.
   >
   > ---
   > Be sure to do all of the following to help us incorporate your contribution
   > quickly and easily:
   >
   > If this PR is a BookKeeper Proposal (BP):
   >
   > - [ ] Make sure the PR title is formatted like:
   >     `<BP-#>: Description of bookkeeper proposal`
   >     `e.g. BP-1: 64 bits ledger is support`
   > - [ ] Attach the master issue link in the description of this PR.
   > - [ ] Attach the google doc link if the BP is written in Google Doc.
   >
   > Otherwise:
   > 
   > - [ ] Make sure the PR title is formatted like:
   >     `<Issue #>: Description of pull request`
   >     `e.g. Issue 123: Description ...`
   > - [ ] Make sure tests pass via `mvn clean apache-rat:check install spotbugs:check`.
   > - [ ] Replace `<Issue #>` in the title with the actual Issue number.
   > 
   > ---
   


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

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] dlg99 commented on pull request #3710: [feature] Added api/v1/bookie/cluster_info REST API

Posted by GitBox <gi...@apache.org>.
dlg99 commented on PR #3710:
URL: https://github.com/apache/bookkeeper/pull/3710#issuecomment-1363198371

   @StevenLuMT dead link checker failure is fixed at https://github.com/apache/bookkeeper/pull/3712
   
   


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

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] eolivelli commented on a diff in pull request #3710: [feature] Added api/v1/bookie/cluster_info REST API

Posted by GitBox <gi...@apache.org>.
eolivelli commented on code in PR #3710:
URL: https://github.com/apache/bookkeeper/pull/3710#discussion_r1055215506


##########
stream/server/src/main/java/org/apache/bookkeeper/stream/server/StorageServer.java:
##########
@@ -256,10 +260,19 @@ public static LifecycleComponent buildStorageServer(CompositeConfiguration conf,
 
             // Build http service
             if (bkServerConf.isHttpServerEnabled()) {
+                MetadataBookieDriver metadataDriver = BookieResources.createMetadataDriver(bkServerConf,

Review Comment:
   are we going to create an additional connection to ZooKeeper ?



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

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] dlg99 merged pull request #3710: [feature] Added api/v1/bookie/cluster_info REST API

Posted by GitBox <gi...@apache.org>.
dlg99 merged PR #3710:
URL: https://github.com/apache/bookkeeper/pull/3710


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

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] StevenLuMT commented on pull request #3710: [feature] Added api/v1/bookie/cluster_info REST API

Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on PR #3710:
URL: https://github.com/apache/bookkeeper/pull/3710#issuecomment-1362557827

   rerun failure checks


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

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] dlg99 commented on a diff in pull request #3710: [feature] Added api/v1/bookie/cluster_info REST API

Posted by GitBox <gi...@apache.org>.
dlg99 commented on code in PR #3710:
URL: https://github.com/apache/bookkeeper/pull/3710#discussion_r1055728783


##########
stream/server/src/main/java/org/apache/bookkeeper/stream/server/StorageServer.java:
##########
@@ -256,10 +260,19 @@ public static LifecycleComponent buildStorageServer(CompositeConfiguration conf,
 
             // Build http service
             if (bkServerConf.isHttpServerEnabled()) {
+                MetadataBookieDriver metadataDriver = BookieResources.createMetadataDriver(bkServerConf,

Review Comment:
   AFAICT, there is an internal cache in MetadataDrivers so if there is one already it will be reused



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

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [bookkeeper] StevenLuMT commented on pull request #3710: [feature] Added api/v1/bookie/cluster_info REST API

Posted by GitBox <gi...@apache.org>.
StevenLuMT commented on PR #3710:
URL: https://github.com/apache/bookkeeper/pull/3710#issuecomment-1362557457

   rerun failure checks


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

To unsubscribe, e-mail: commits-unsubscribe@bookkeeper.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org