narendly commented on a change in pull request #751: Implement
getAllMappingUnderPath and getMetadataStoreRealm
URL: https://github.com/apache/helix/pull/751#discussion_r377845123
##########
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!");
+ }
+ return _routingDataMap.get(namespace).getAllMappingUnderPath(path);
}
@Override
public String getMetadataStoreRealm(String namespace, String shardingKey) {
- // 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:
Should we fix this error message?
----------------------------------------------------------------
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]