You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/06/19 02:38:59 UTC

[GitHub] [druid] clintropolis commented on a change in pull request #10054: Add safeguard to make sure new Rules added are aware of Rule usage in loadstatus API

clintropolis commented on a change in pull request #10054:
URL: https://github.com/apache/druid/pull/10054#discussion_r442600466



##########
File path: server/src/main/java/org/apache/druid/server/coordinator/rules/Rule.java
##########
@@ -51,6 +51,14 @@
 
   boolean appliesTo(Interval interval, DateTime referenceTimestamp);
 
+  /**
+   * Returns whether this Rules should be matched and considered in loadstatus API.
+   * In general, Rules that load segment onto any Druid node should return true.
+   * Any Rule that returns true for this method should add a compute logic (as if case condition) for the particular
+   * Rule class in {@link DruidCoordinator#computeUnderReplicationCountsPerDataSourcePerTierForSegments}
+   */
+  boolean matchLoadStatusCount();

Review comment:
       It seems leaky to tie this call to an API method, rather, what is being captured here is whether or not a `Rule` will load data instead of dropping data, because not all rules that load data are of type `LoadRule`. Should this just be `isLoadRule()` or something to that effect?




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



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org