Add /api/v1/bookie/info REST API#2322
Merged
sijie merged 3 commits intoapache:masterfrom May 19, 2020
Merged
Conversation
Contributor
|
@mino181295 PTAL this will be very useful for BookKeeper Visual Manager once BP-38 lands to BookKeeper 4.11 |
eolivelli
approved these changes
Apr 29, 2020
mino181295
approved these changes
Apr 29, 2020
Contributor
|
Cool, LGTM! |
Contributor
Author
|
Awesome! Thanks for the quick review! |
jiazhai
approved these changes
May 3, 2020
Contributor
|
@fretiq can you please resolve the conflicts ? |
Contributor
Author
|
Conflicts resolved. |
Contributor
|
rerun failure tests |
Ghatage
pushed a commit
to Ghatage/bookkeeper
that referenced
this pull request
Jun 19, 2020
Descriptions of the changes in this PR:
This adds an additional HTTP REST endpoint to expose the bookie's info (only storage numbers for now).
### Motivation
I was looking for an HTTP endpoint that returned the info of only the current bookie, but couldn't find one. The only similar API I've found was `/api/v1/bookie/list_bookie_info`, however it connects to all bookies and may take a long time to respond (plus its response format is difficult to parse).
### Changes
I've added a new API at `/api/v1/bookie/info` that returns a response like:
```json
{
"freeSpace" : 0,
"totalSpace" : 0
}
```
Reviewers: Matteo Minardi <minardi.matteo@hotmail.it>, Enrico Olivelli <eolivelli@gmail.com>, Jia Zhai <zhaijia@apache.org>
This closes apache#2322 from fretiq/add-bookie-info-api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Descriptions of the changes in this PR:
This adds an additional HTTP REST endpoint to expose the bookie's info (only storage numbers for now).
Motivation
I was looking for an HTTP endpoint that returned the info of only the current bookie, but couldn't find one. The only similar API I've found was
/api/v1/bookie/list_bookie_info, however it connects to all bookies and may take a long time to respond (plus its response format is difficult to parse).Changes
I've added a new API at
/api/v1/bookie/infothat returns a response like:{ "freeSpace" : 0, "totalSpace" : 0 }