alirezazamani commented on a change in pull request #834: Complete the Routing
Table Provider for CustomizedView
URL: https://github.com/apache/helix/pull/834#discussion_r394539872
##########
File path:
helix-core/src/main/java/org/apache/helix/spectator/RoutingDataCache.java
##########
@@ -40,14 +47,31 @@
class RoutingDataCache extends BasicClusterDataCache {
private static Logger LOG =
LoggerFactory.getLogger(RoutingDataCache.class.getName());
- private final PropertyType _sourceDataType;
+ private final Map<PropertyType, List<String>> _sourceDataTypeMap;
+
private CurrentStateCache _currentStateCache;
+ // TODO: CustomizedCache needs to be migrated to propertyCache. Once we
migrate all cache to
+ // propertyCache, this hardcoded list of fields won't be necessary.
+ private Map<String, CustomizedViewCache> _customizedViewCaches;
private TargetExternalViewCache _targetExternalViewCache;
public RoutingDataCache(String clusterName, PropertyType sourceDataType) {
+ this (clusterName, ImmutableMap.of(sourceDataType,
Collections.emptyList()));
+ }
+
+ /**
+ * Initialize empty RoutingDataCache with clusterName, _propertyTypes.
+ * @param clusterName
+ * @param sourceDataTypeMap
+ */
+ public RoutingDataCache(String clusterName, Map<PropertyType, List<String>>
sourceDataTypeMap) {
super(clusterName);
- _sourceDataType = sourceDataType;
+ _sourceDataTypeMap = sourceDataTypeMap;
_currentStateCache = new CurrentStateCache(clusterName);
+ _customizedViewCaches = new HashMap<>();
Review comment:
Done.
----------------------------------------------------------------
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]