narendly commented on a change in pull request #788: Implement request 
forwarding for ZkRoutingDataWriter
URL: https://github.com/apache/helix/pull/788#discussion_r384765628
 
 

 ##########
 File path: 
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/accessor/ZkRoutingDataWriter.java
 ##########
 @@ -77,8 +106,11 @@ public synchronized boolean addMetadataStoreRealm(String 
realm) {
       return createZkRealm(realm);
     }
 
-    // TODO: Forward the request to leader
-    return true;
+    String urlSuffix =
+        
constructUrlSuffix(MetadataStoreRoutingConstants.MSDS_GET_ALL_REALMS_ENDPOINT, 
realm);
+    return forwardRequestToLeader(urlSuffix,
+        MetadataStoreRoutingConstants.HttpRequestForwardingVerbs.PUT, 
"addMetadataStoreRealm",
 
 Review comment:
   1. If you want these HTTP verbs included in `MetadataStoreRoutingConstants 
`, you could use a more generalized name like `HttpVerbs`.  
`HttpRequestForwardingVerbs` if you want to keep it as an enum in this class.
   2. If you want to generalize and put this in MetadataStoreRoutingConstants, 
then I'm pretty sure you could already find the supported HTTP verb enum 
somewhere defined in helix-rest module. Use that instead.

----------------------------------------------------------------
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]

Reply via email to