NealSun96 commented on a change in pull request #844: Implement setRoutingData
for MetadataStoreDirectoryService
URL: https://github.com/apache/helix/pull/844#discussion_r387194671
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/resources/metadatastore/MetadataStoreDirectoryAccessor.java
##########
@@ -220,6 +228,24 @@ public Response getRoutingData() {
return JSONRepresentation(responseMap);
}
+ @PUT
+ @Path("/routing-data")
+ @Consumes(MediaType.APPLICATION_JSON)
+ public Response setRoutingData(String jsonContent) {
+ try {
+ Map<String, List<String>> routingData = new ObjectMapper()
Review comment:
Although I agree with the same change in `ZkRoutingDataWriter`, in this case
it's actually unnecessary because `MetadataStoreDirectoryAccessor` has a
per-request cycle. This object mapper will be reconstructed every time anyway.
Given that, the object mapper is better a local variable because it's not used
anywhere else.
----------------------------------------------------------------
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]