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_r390005282
 
 

 ##########
 File path: 
helix-core/src/main/java/org/apache/helix/spectator/RoutingDataCache.java
 ##########
 @@ -41,13 +43,30 @@
   private static Logger LOG = 
LoggerFactory.getLogger(RoutingDataCache.class.getName());
 
   private final PropertyType _sourceDataType;
+  // Aggregation type is used for CustomizedView only.
+  private final String _aggregationType;
+
   private CurrentStateCache _currentStateCache;
+  private CustomizedViewCache _customizedViewCache;
   private TargetExternalViewCache _targetExternalViewCache;
 
+
   public RoutingDataCache(String clusterName, PropertyType sourceDataType) {
 
 Review comment:
   So based on your usage now, the cache can be a combination of 2 types of 
data.
   1. the partition state map
   2. the customized view state map
   
   I can see you are trying to keep the assumption that one cache only serves 
for one type (also customize state type). However, that assumption becomes 
useless when we need to output snapshot to be a combination.
   
   So 2 alternative ways as my suggestion:
   1. Split the current cache object as you did for CustomizedViewRoutingTable. 
So they are still one-one mapping.
   2. Or, make this cache support multiple types, so it is one-one mapping with 
the RoutingTableProvider.

----------------------------------------------------------------
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]

Reply via email to