narendly commented on a change in pull request #751: Implement
getAllMappingUnderPath and getMetadataStoreRealm
URL: https://github.com/apache/helix/pull/751#discussion_r377872125
##########
File path:
helix-rest/src/main/java/org/apache/helix/rest/metadatastore/ZkMetadataStoreDirectory.java
##########
@@ -119,14 +119,20 @@ public ZkMetadataStoreDirectory(Map<String, String>
routingZkAddressMap)
@Override
public Map<String, String> getAllMappingUnderPath(String namespace, String
path) {
- // TODO: get it from routingData
- throw new UnsupportedOperationException();
+ if (!_routingDataMap.containsKey(namespace)) {
+ throw new IllegalArgumentException(
+ "Failed to get all mapping under path: Namespace " + namespace + "
is not found!");
Review comment:
> throw new NoSuchElementException("Namespace " + namespace + " does not
exist!");
?
For read methods, please use NoSuchElement where appropriate.
For write methods, use IllegalArgument?
----------------------------------------------------------------
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]