Skip to content

Added: api/keyspace/tablets/[shard]#4232

Merged
sougou merged 4 commits intovitessio:masterfrom
github:ks-tablets-api-2
Oct 17, 2018
Merged

Added: api/keyspace/tablets/[shard]#4232
sougou merged 4 commits intovitessio:masterfrom
github:ks-tablets-api-2

Conversation

@shlomi-noach
Copy link
Contributor

@shlomi-noach shlomi-noach commented Oct 2, 2018

Resubmission of #4207, having messed up commit signoff.

This PR adds an API endpoint to vtctld:

  • /api/ks_tables/my_keyspace
  • /api/ks_tables/my_keyspace/-80

EDIT: endpoint path has changed as per request, see comments below.

The API returns a list of all tablets for a given keyspace, optionally further filtered by shard.

The context for this PR is https://github.com/github/freno, and in particular github/freno#70: giving the freno throttling tool an easy way to determine the roster of MySQL servers (host & port) it needs to poll for replication lag.

cc @github/database-infrastructure

Shlomi Noach added 2 commits September 12, 2018 12:05
Updating from upstream
Signed-off-by: Shlomi Noach <shlomi-noach@github.com>
@shlomi-noach shlomi-noach mentioned this pull request Oct 2, 2018
@shlomi-noach shlomi-noach changed the title Ks tablets api 2 API: ks_tablets Oct 2, 2018
@dkhenry
Copy link
Contributor

dkhenry commented Oct 2, 2018

@shlomi-noach would it make more sense to have the the endpoints be api/keyspace/<keyspace name>/tablets and api/keyspace/<keyspace name>/tablets/-80

@shlomi-noach
Copy link
Contributor Author

@dkhenry sure, I'll modify the path.

Shlomi Noach added 2 commits October 15, 2018 11:23
Signed-off-by: Shlomi Noach <shlomi-noach@github.com>
Signed-off-by: Shlomi Noach <shlomi-noach@github.com>
@shlomi-noach shlomi-noach changed the title API: ks_tablets Added: api/keyspace/tablets/[shard] Oct 15, 2018
@shlomi-noach
Copy link
Contributor Author

Endpoint path has changed as per request, and is now:

  • api/keyspace/<keyspace name>/tablets, or
  • api/keyspace/<keyspace name>/tablets/<shard-name>

This is deployed and runs well in production.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants