pkuwm commented on a change in pull request #799: [MSDS] Add REST endpoint to
get mapping of all sharding keys by realm
URL: https://github.com/apache/helix/pull/799#discussion_r382972760
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/resources/metadatastore/MetadataStoreDirectoryAccessor.java
##########
@@ -167,14 +183,22 @@ public Response
deleteMetadataStoreRealm(@PathParam("realm") String realm) {
*/
@GET
@Path("/sharding-keys")
- public Response getShardingKeys(@QueryParam("prefix") String prefix) {
+ public Response getShardingKeys(@QueryParam("prefix") String prefix,
+ @DefaultValue("false") @QueryParam("groupByRealm") boolean groupByRealm)
{
try {
- if (prefix == null) {
- // For endpoint: "/sharding-keys" to get all sharding keys in a
namespace.
- return getAllShardingKeys();
+ if (prefix != null) {
+ // For endpoint: "/sharding-keys?prefix={prefix}"
+ // Ignore groupByRealm because response already has realm info for
each sharding key.
Review comment:
This is a good name that I was trying to have. I tried to have a better name
but did not realize that this is actually a routing data endpoint. I have to
admit that I don't have a keen sense of `routing data`. I will refactor this.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]