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/04/10 21:53:32 UTC

[GitHub] [helix] mgao0 commented on a change in pull request #946: Move routing table provider initialization

mgao0 commented on a change in pull request #946: Move routing table provider initialization
URL: https://github.com/apache/helix/pull/946#discussion_r406959499
 
 

 ##########
 File path: helix-core/src/test/java/org/apache/helix/integration/TestCustomizedViewAggregation.java
 ##########
 @@ -120,6 +118,23 @@ public void beforeClass() throws Exception {
     _localCustomizedView = new HashMap<>();
     _routingTableProviderDataSources = new HashSet<>();
     _aggregationEnabledTypes = new HashSet<>();
+
+    List<String> customizedStateTypes = Arrays
+        .asList(CustomizedStateType.TYPE_A.name(), CustomizedStateType.TYPE_B.name(),
+            CustomizedStateType.TYPE_C.name());
+
+    CustomizedStateConfig.Builder customizedStateConfigBuilder =
+        new CustomizedStateConfig.Builder();
+    customizedStateConfigBuilder.setAggregationEnabledTypes(customizedStateTypes);
+    HelixDataAccessor accessor = _manager.getHelixDataAccessor();
+    accessor.setProperty(accessor.keyBuilder().customizedStateConfig(),
+        customizedStateConfigBuilder.build());
+    _aggregationEnabledTypes.addAll(customizedStateTypes);
+
+    Map<PropertyType, List<String>> dataSource = new HashMap<>();
+    dataSource.put(PropertyType.CUSTOMIZEDVIEW, customizedStateTypes);
+    _routingTableProvider = new RoutingTableProvider(_spectator, dataSource);
+    _routingTableProviderDataSources.addAll(customizedStateTypes);
 
 Review comment:
   Good point. I added back two tests on this.

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