mgao0 commented on a change in pull request #849: Add REST APIs for get, set,
update RestConfig
URL: https://github.com/apache/helix/pull/849#discussion_r389074920
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/server/resources/helix/ClusterAccessor.java
##########
@@ -511,6 +512,89 @@ public Response
removeClusterStateModelDefinition(@PathParam("clusterId") String
return OK();
}
+ @PUT
+ @Path("{clusterId}/restconfig")
+ public Response createClusterRESTConfig(@PathParam("clusterId") String
clusterId,
+ String content) {
+ ZNRecord record;
+ try {
+ record = toZNRecord(content);
+ } catch (IOException e) {
+ _logger.error("Failed to deserialize user's input " + content + ",
Exception: " + e);
Review comment:
I see. Thank you for explanation @zhangmeng916. @pkuwm Here I'm following
the format that is used by other methods in this class. But the way you
suggested does provide a clearer and easier way to form the message. Later we
can have a separate PR to change all the log messages in Helix to adopt the
sl4j {} function.
----------------------------------------------------------------
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]