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_r394044846
##########
File path:
helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java
##########
@@ -529,68 +901,88 @@ private void
updateCurrentStatesListeners(List<LiveInstance> liveInstances,
private void reset() {
logger.info("Resetting the routing table.");
- RoutingTable newRoutingTable = new RoutingTable();
- _routingTableRef.set(newRoutingTable);
+ for (String key: _routingTableRefMap.keySet()) {
+ PropertyType propertyType =
_routingTableRefMap.get(key).get().getPropertyType();
+ if (propertyType == PropertyType.CUSTOMIZEDVIEW) {
+ String stateType = _routingTableRefMap.get(key).get().getStateType();
+ RoutingTable newRoutingTable = new
CustomizedViewRoutingTable(propertyType, stateType);
+ _routingTableRefMap.get(key).set(newRoutingTable);
Review comment:
nit, move this outside the condition block for reducing verbose code.
----------------------------------------------------------------
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]