narendly commented on a change in pull request #844: Implement setRoutingData
for MetadataStoreDirectoryService
URL: https://github.com/apache/helix/pull/844#discussion_r387274622
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java
##########
@@ -332,20 +350,21 @@ private String constructUrlSuffix(String... urlParams) {
return String.join("", allUrlParameters);
}
- private boolean forwardRequestToLeader(String urlSuffix,
HttpConstants.RestVerbs request_method,
- int expectedResponseCode) throws IllegalArgumentException {
+ private boolean buildAndSendRequestToLeader(String urlSuffix,
+ HttpConstants.RestVerbs requestMethod, int expectedResponseCode)
+ throws IllegalArgumentException {
String leaderHostName = _leaderElection.getCurrentLeaderInfo().getId();
String url = leaderHostName + urlSuffix;
HttpUriRequest request;
- switch (request_method) {
+ switch (requestMethod) {
case PUT:
request = new HttpPut(url);
break;
case DELETE:
request = new HttpDelete(url);
break;
default:
- LOG.error("Unsupported request_method: " + request_method.name());
+ LOG.error("Unsupported requestMethod: " + requestMethod.name());
Review comment:
I think it would be better to throw an exception here because this is not
supposed to happen.
----------------------------------------------------------------
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]