Skip to content

Add /api/v1/bookie/info REST API#2322

Merged
sijie merged 3 commits intoapache:masterfrom
fretiq:add-bookie-info-api
May 19, 2020
Merged

Add /api/v1/bookie/info REST API#2322
sijie merged 3 commits intoapache:masterfrom
fretiq:add-bookie-info-api

Conversation

@fretiq
Copy link
Copy Markdown
Contributor

@fretiq fretiq commented Apr 29, 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:

{
  "freeSpace" : 0,
  "totalSpace" : 0
}

@eolivelli
Copy link
Copy Markdown
Contributor

@mino181295 PTAL this will be very useful for BookKeeper Visual Manager once BP-38 lands to BookKeeper 4.11

Copy link
Copy Markdown
Contributor

@eolivelli eolivelli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great work @fretiq

@mino181295
Copy link
Copy Markdown
Contributor

Cool, LGTM!

@fretiq
Copy link
Copy Markdown
Contributor Author

fretiq commented Apr 29, 2020

Awesome! Thanks for the quick review!

@eolivelli
Copy link
Copy Markdown
Contributor

@fretiq can you please resolve the conflicts ?
then we are good to go

@fretiq
Copy link
Copy Markdown
Contributor Author

fretiq commented May 5, 2020

Conflicts resolved.

@eolivelli
Copy link
Copy Markdown
Contributor

rerun failure tests

@sijie sijie added this to the 4.11.0 milestone May 19, 2020
@sijie sijie merged commit a8eb2d6 into apache:master May 19, 2020
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants