You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by no...@apache.org on 2019/05/23 06:59:30 UTC
[lucene-solr] 01/02: SOLR-13484: ref guide
This is an automated email from the ASF dual-hosted git repository.
noble pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git
commit da5e46fc5a5913c2909a83fe774dd3ffc7b6d586
Author: Noble Paul <no...@apache.org>
AuthorDate: Thu May 23 16:56:48 2019 +1000
SOLR-13484: ref guide
---
.../src/solrcloud-autoscaling-api.adoc | 122 +++++++++++++++++++++
1 file changed, 122 insertions(+)
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
index fa4135e..acbfe16 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
@@ -142,6 +142,128 @@ However, since the first node in the first example had more than 1 replica for a
In the above example the node with port 8983 has two replicas for `shard1` in violation of our policy.
+=== Inline Policy Configuration
+
+If there is no autoscaling policy configured or if you wish to use a configuration other than the default, it is possible to send the autoscaling policy JSON as an inline payload as follows:
+
+[source,bash]
+----
+ curl -X POST -H 'Content-type:application/json' -d '{
+ "cluster-policy": [
+ {"replica": 0, "port" : "7574"} ]
+ }' http://localhost:8983/api/cluster/autoscaling/diagnostics?omitHeader=true
+----
+
+*Output*
+[source,json]
+----
+{
+ "diagnostics":{
+ "sortedNodes":[{
+ "node":"10.0.0.80:7574_solr",
+ "isLive":true,
+ "cores":2.0,
+ "freedisk":567.4989128112793,
+ "port":7574,
+ "totaldisk":1044.122688293457,
+ "replicas":{"mycoll":{
+ "shard2":[{
+ "core_node7":{
+ "core":"mycoll_shard2_replica_n4",
+ "shard":"shard2",
+ "collection":"mycoll",
+ "node_name":"10.0.0.80:7574_solr",
+ "type":"NRT",
+ "base_url":"http://10.0.0.80:7574/solr",
+ "state":"active",
+ "force_set_state":"false",
+ "INDEX.sizeInGB":6.426125764846802E-8}}],
+ "shard1":[{
+ "core_node3":{
+ "core":"mycoll_shard1_replica_n1",
+ "shard":"shard1",
+ "collection":"mycoll",
+ "node_name":"10.0.0.80:7574_solr",
+ "type":"NRT",
+ "base_url":"http://10.0.0.80:7574/solr",
+ "state":"active",
+ "force_set_state":"false",
+ "INDEX.sizeInGB":6.426125764846802E-8}}]}}}
+ ,{
+ "node":"10.0.0.80:8983_solr",
+ "isLive":true,
+ "cores":2.0,
+ "freedisk":567.498908996582,
+ "port":8983,
+ "totaldisk":1044.122688293457,
+ "replicas":{"mycoll":{
+ "shard2":[{
+ "core_node8":{
+ "core":"mycoll_shard2_replica_n6",
+ "shard":"shard2",
+ "collection":"mycoll",
+ "node_name":"10.0.0.80:8983_solr",
+ "type":"NRT",
+ "leader":"true",
+ "base_url":"http://10.0.0.80:8983/solr",
+ "state":"active",
+ "force_set_state":"false",
+ "INDEX.sizeInGB":6.426125764846802E-8}}],
+ "shard1":[{
+ "core_node5":{
+ "core":"mycoll_shard1_replica_n2",
+ "shard":"shard1",
+ "collection":"mycoll",
+ "node_name":"10.0.0.80:8983_solr",
+ "type":"NRT",
+ "leader":"true",
+ "base_url":"http://10.0.0.80:8983/solr",
+ "state":"active",
+ "force_set_state":"false",
+ "INDEX.sizeInGB":6.426125764846802E-8}}]}}}],
+ "liveNodes":["10.0.0.80:7574_solr",
+ "10.0.0.80:8983_solr"],
+ "violations":[{
+ "collection":"mycoll",
+ "tagKey":7574,
+ "violation":{
+ "replica":{
+ "NRT":2,
+ "count":2},
+ "delta":2.0},
+ "clause":{
+ "replica":0,
+ "port":"7574",
+ "collection":"mycoll"},
+ "violatingReplicas":[{
+ "core_node7":{
+ "core":"mycoll_shard2_replica_n4",
+ "shard":"shard2",
+ "collection":"mycoll",
+ "node_name":"10.0.0.80:7574_solr",
+ "type":"NRT",
+ "base_url":"http://10.0.0.80:7574/solr",
+ "state":"active",
+ "force_set_state":"false",
+ "INDEX.sizeInGB":6.426125764846802E-8}}
+ ,{
+ "core_node3":{
+ "core":"mycoll_shard1_replica_n1",
+ "shard":"shard1",
+ "collection":"mycoll",
+ "node_name":"10.0.0.80:7574_solr",
+ "type":"NRT",
+ "base_url":"http://10.0.0.80:7574/solr",
+ "state":"active",
+ "force_set_state":"false",
+ "INDEX.sizeInGB":6.426125764846802E-8}}]}],
+ "config":{
+ "cluster-policy":[{
+ "replica":0,
+ "port":"7574"}]}},
+ "WARNING":"This response format is experimental. It is likely to change in the future."}
+----
+
== Suggestions API
Suggestions are operations recommended by the system according to the policies and preferences the user has set.