writer-jill commented on code in PR #13181:
URL: https://github.com/apache/druid/pull/13181#discussion_r1005668655
##########
docs/operations/rule-configuration.md:
##########
@@ -23,212 +23,242 @@ title: "Retaining or automatically dropping data"
-->
-In Apache Druid, Coordinator processes use rules to determine what data should
be loaded to or dropped from the cluster. Rules are used for data retention and
query execution, and are set via the [web console](./web-console.md).
+In Apache Druid, [Coordinator processes](../design/coordinator.md) use rules
to determine what data to retain or drop from the cluster.
-There are three types of rules, i.e., load rules, drop rules, and broadcast
rules. Load rules indicate how segments should be assigned to different
historical process tiers and how many replicas of a segment should exist in
each tier.
-Drop rules indicate when segments should be dropped entirely from the cluster.
Finally, broadcast rules indicate how segments of different datasources should
be co-located in Historical processes.
+There are three types of rules: [load](#load-rules), [drop](#drop-rules), and
[broadcast](#broadcast-rules). See the sections below for more information on
each type.
-The Coordinator loads a set of rules from the metadata storage. Rules may be
specific to a certain datasource and/or a
-default set of rules can be configured. Rules are read in order and hence the
ordering of rules is important. The
-Coordinator will cycle through all used segments and match each segment with
the first rule that applies. Each segment
-may only match a single rule.
+The Coordinator loads a set of rules from the metadata storage. You can
configure a default set of rules to apply to all data sources, and/or you can
set specific rules for specific data sources.
-Note: It is recommended that the web console is used to configure rules.
However, the Coordinator process does have HTTP endpoints to programmatically
configure rules.
+## Set a rule
+
+To set a default retention rule for all data sources, send a POST request to
the following API:
+
+`/druid/coordinator/v1/rules/_default`
+
+To set a retention rule for a specific data source, send a POST request to the
following API:
+
+`/druid/coordinator/v1/rules/{dataSourceName}`
+
+The rules API accepts a list of rules. The payload you send in the API request
for each rule is specific to the rules types outlined below.
+
+You can also set rules using the [web console](./web-console.md). Go into a
data source and select **Actions** > **Edit retention rules**.
+
+### Rule order
+
+The order of rules is important. The Coordinator reads rules in the order in
which they appear in the rules list. For example, in the following screenshot
the Coordinator evaluates data against rule 1, then rule 2, then rule 3:
+
+
+
+In the web console you can use the up and down arrows on the right side of the
interface to change the order of the rules.
+
+The Coordinator cycles through all used segments and matches each segment with
the first rule that applies. Each segment can only match a single rule.
## Load rules
-Load rules indicate how many replicas of a segment should exist in a server
tier. **Please note**: If a Load rule is used to retain only data from a
certain interval or period, it must be accompanied by a Drop rule. If a Drop
rule is not included, data not within the specified interval or period will be
retained by the default rule (loadForever).
+Load rules define how Druid assigns segments to historical process tiers, and
how many replicas of a segment exist in each tier.
+
+If you want to use a load rule to retain only data from a defined period of
time, you must also define a drop rule. If you don't define a drop rule, Druid
retains data that doesn't lie within your defined period according to the
default rule, `loadForever`.
Review Comment:
Updated.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]