maytasm commented on a change in pull request #10054:
URL: https://github.com/apache/druid/pull/10054#discussion_r442608656
##########
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:
I don't like calling it `isLoadRule` because there is a class/interface
`LoadRule` and not all things that return true for this method are of the
class/subclass of that class/interface `LoadRule`. But I agree let's not tie it
to API. How about calling it `isRuleLoadSegments` or `canLoadSegments` or
`isLoadSegments`.
Although, I still want to leave the comment `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}`
there. Since that will help people find the appropriate place to change/add
when creating new Rule. What do you think?
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]