jiajunwang commented on a change in pull request #834: Complete the Routing
Table Provider for CustomizedView
URL: https://github.com/apache/helix/pull/834#discussion_r390014080
##########
File path:
helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java
##########
@@ -338,14 +525,37 @@ public Object removeRoutingTableChangeListener(
return getInstancesForResource(resourceName, state);
}
+ public Set<InstanceConfig> getInstances(String resourceName, String state,
+ PropertyType propertyType) {
+ return getInstancesForResource(resourceName, state, propertyType);
+ }
+
+ public Set<InstanceConfig> getInstances(String resourceName, String state,
+ PropertyType propertyType, String type) {
+ return getInstancesForResource(resourceName, state, propertyType, type);
+ }
+
/**
* returns all instances for {resource} that are in a specific {state}.
* @param resourceName
* @param state
* @return empty list if there is no instance in a given state
*/
public Set<InstanceConfig> getInstancesForResource(String resourceName,
String state) {
- return _routingTableRef.get().getInstancesForResource(resourceName, state);
+ String key = getRoutingTableKey();
+ return
_routingTableRef.get(key).get().getInstancesForResource(resourceName, state);
+ }
+
+ public Set<InstanceConfig> getInstancesForResource(String resourceName,
String state,
Review comment:
Same here. If not in the design, let's hold this for now.
----------------------------------------------------------------
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]