You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2020/05/18 08:01:25 UTC
[lucene-solr] branch jira/solr-13325 updated: SOLR-13325: Expanded
the description of the new feature to include the fact that values must
match exactly and all properties must match. Added an example with multiple
properties.
This is an automated email from the ASF dual-hosted git repository.
shalin pushed a commit to branch jira/solr-13325
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
The following commit(s) were added to refs/heads/jira/solr-13325 by this push:
new d6f64bd SOLR-13325: Expanded the description of the new feature to include the fact that values must match exactly and all properties must match. Added an example with multiple properties.
d6f64bd is described below
commit d6f64bd8de960a7ad7d27b4b6ea829e7b884fcc1
Author: Shalin Shekhar Mangar <sh...@apache.org>
AuthorDate: Mon May 18 13:31:11 2020 +0530
SOLR-13325: Expanded the description of the new feature to include the fact that values must match exactly and all properties must match. Added an example with multiple properties.
---
.../src/solrcloud-autoscaling-trigger-actions.adoc | 35 ++++++++++++++++++++--
1 file changed, 33 insertions(+), 2 deletions(-)
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
index 2c39e8f..099f992 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-trigger-actions.adoc
@@ -29,11 +29,17 @@ commands which can re-balance the cluster in response to trigger events.
The following parameters are configurable:
`collections`::
-A comma-separated list of collection names. This can also be a selector on the collection property e.g. `collections: {'policy': 'my_custom_policy'}` will match all collections which use the policy named `my_customer_policy`.
+A comma-separated list of collection names, or a selector on collection properties that can be used to filter collections for which the plan is computed.
If a non-empty list or selector is specified then the computed operations will only calculate collection operations that affect
matched collections and ignore any other collection operations for collections
-not listed here. Note that non-collection operations are not affected by this.
+not listed here. This does not affect non-collection operations.
+
+A collection selector is of the form `collections: {key1: value1, key2: value2, ...}` where the key can be any collection property such as `name`, `policy`, `numShards` etc.
+The value must match exactly and all specified properties must match for a collection to match.
+
+A collection selector is useful in a cluster where collections are added and removed frequently and where selecting only collections that
+use a specific autoscaling policy is useful.
Example configurations:
@@ -89,6 +95,31 @@ if they cause policy violations.
In this example only collections which use the `my_policy` as their autoscaling policy will be potentially replicated / moved to an added node, other collections will be ignored even if they cause policy violations.
+[source,json]
+----
+{
+ "set-trigger" : {
+ "name" : "node_added_trigger",
+ "event" : "nodeAdded",
+ "waitFor" : "1s",
+ "enabled" : true,
+ "actions" : [
+ {
+ "name" : "compute_plan",
+ "class" : "solr.ComputePlanAction",
+ "collections" : {"policy": "my_policy", "numShards" : "4"}
+ },
+ {
+ "name" : "execute_plan",
+ "class" : "solr.ExecutePlanAction"
+ }
+ ]
+ }
+}
+----
+
+In this example only collections which use the `my_policy` as their autoscaling policy and that have `numShards` equal to `4` will be potentially replicated / moved to an added node, other collections will be ignored even if they cause policy violations.
+
== Execute Plan Action
The `ExecutePlanAction` executes the Collection API commands emitted by the `ComputePlanAction` against