You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2020/03/14 01:59:45 UTC

[GitHub] [helix] jiajunwang commented on a change in pull request #888: Modify data providers and add customized view aggregation stage

jiajunwang commented on a change in pull request #888: Modify data providers and add customized view aggregation stage
URL: https://github.com/apache/helix/pull/888#discussion_r392542323
 
 

 ##########
 File path: helix-core/src/main/java/org/apache/helix/controller/dataproviders/ResourceControllerDataProvider.java
 ##########
 @@ -156,6 +161,23 @@ private void refreshTargetExternalViews(final HelixDataAccessor accessor) {
     }
   }
 
+  public void refreshCustomizedViewMap(final HelixDataAccessor accessor) {
+    // As we are not listening on customized view change, customized view will be
+    // refreshed once during the cache's first refresh() call, or when full refresh is required
+    List<String> stateTypes = accessor.getChildNames(accessor.keyBuilder().customizedViews());
+    if (_propertyDataChangedMap.get(HelixConstants.ChangeType.CUSTOMIZED_VIEW).getAndSet(false)) {
+      for (String stateType: stateTypes) {
+        _customizedViewCacheMap.get(stateType).refresh(accessor);
 
 Review comment:
   The map is initialized as en empty map. Do we need to check for NPE here?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org