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_r394042833
##########
File path:
helix-core/src/main/java/org/apache/helix/spectator/RoutingTableProvider.java
##########
@@ -457,13 +819,23 @@ public void onLiveInstanceChange(List<LiveInstance>
liveInstances,
@PreFetch(enabled = false)
public void onStateChange(String instanceName, List<CurrentState> statesInfo,
NotificationContext changeContext) {
- if (_sourceDataType.equals(PropertyType.CURRENTSTATES)) {
+ if (_sourceDataTypeMap.containsKey(PropertyType.CURRENTSTATES)) {
_routerUpdater.queueEvent(changeContext,
ClusterEventType.CurrentStateChange,
HelixConstants.ChangeType.CURRENT_STATE);
} else {
logger.warn(
"RoutingTableProvider does not use CurrentStates as source, ignore
CurrentState changes!");
}
+ _routerUpdater.queueEvent(changeContext,
ClusterEventType.CurrentStateChange,
+ HelixConstants.ChangeType.CURRENT_STATE);
+ }
+
+ @Override
+ @PreFetch(enabled = false)
+ public void onCustomizedViewChange(List<CustomizedView> customizedViewList,
+ NotificationContext changeContext) {
+ _routerUpdater.queueEvent(changeContext,
ClusterEventType.CustomizedViewChange,
Review comment:
Safer to add the same source type check we did for the other listeners.
----------------------------------------------------------------
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]