egor-ryashin commented on a change in pull request #6349: maintenance mode for
Historical
URL: https://github.com/apache/incubator-druid/pull/6349#discussion_r220917221
##########
File path:
server/src/test/java/org/apache/druid/server/coordinator/rules/BroadcastDistributionRuleTest.java
##########
@@ -253,6 +313,46 @@ public void testBroadcastToSingleDataSource()
assertFalse(holderOfSmallSegment.getPeon().getSegmentsToLoad().contains(smallSegment));
}
+ /**
+ * Servers:
+ * name | segments
+ * -------------+--------------
+ * general | large segment
+ * maintenance1 | small segment
+ * maintenance2 | large segment
+ *
+ * After running the rule for the small segment:
+ * general | large & small segments
+ * maintenance1 |
+ * maintenance2 | large segment
+ */
+ @Test
+ public void testBroadcastWithMaintenance()
+ {
+ final ForeverBroadcastDistributionRule rule = new
ForeverBroadcastDistributionRule(ImmutableList.of("large_source"));
+
+ CoordinatorStats stats = rule.run(
+ null,
+ DruidCoordinatorRuntimeParams.newBuilder()
+ .withDruidCluster(secondCluster)
+
.withSegmentReplicantLookup(SegmentReplicantLookup.make(secondCluster))
+
.withBalancerReferenceTimestamp(DateTimes.of("2013-01-01"))
+ .withAvailableSegments(Lists.newArrayList(
Review comment:
I don't think we should extend a production class method list for test
purposes only.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]