lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject [lucene-solr] branch branch_8x updated: SOLR-13484: ref-guide
Date Thu, 23 May 2019 22:23:31 GMT
This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch branch_8x
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/branch_8x by this push:
     new 493364d  SOLR-13484: ref-guide
493364d is described below

commit 493364d4b19aa869cdf46129952b885fbf548b69
Author: noble <noble@apache.org>
AuthorDate: Fri May 24 08:23:11 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.
 


Mime
View raw message