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:29 UTC

[lucene-solr] branch master updated (3ed31cf -> 975a4f8)

This is an automated email from the ASF dual-hosted git repository.

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


    from 3ed31cf  Fix TestStressCloudBlindAtomicUpdates to play nice with tests.dups
     add 750a5fd  SOLR-13484: autoscaling/diagnostics APIshould be able to give diagnostics output from config pasted as a payload
     add a1c9f8f  SOLR-13484: refactored code
     new da5e46f  SOLR-13484: ref guide
     new 975a4f8  Merge remote-tracking branch 'origin/master' into jira/SOLR-13484

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../solr/cloud/autoscaling/AutoScalingHandler.java |  59 ++++++----
 .../org/apache/solr/handler/SchemaHandler.java     |   6 +-
 .../org/apache/solr/handler/SolrConfigHandler.java |   3 +-
 .../org/apache/solr/request/SolrRequestInfo.java   |   2 +-
 .../cloud/autoscaling/AutoScalingHandlerTest.java  |  20 ++++
 .../solr/handler/admin/TestApiFramework.java       |   3 +-
 .../src/solrcloud-autoscaling-api.adoc             | 122 +++++++++++++++++++++
 .../java/org/apache/solr/common/util/StrUtils.java |   7 ++
 .../java/org/apache/solr/common/util/Utils.java    |   6 +-
 9 files changed, 196 insertions(+), 32 deletions(-)


[lucene-solr] 02/02: Merge remote-tracking branch 'origin/master' into jira/SOLR-13484

Posted by no...@apache.org.
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 975a4f8f5511b93d4d36dfa9bdfce43b6d0c4f1b
Merge: da5e46f 3ed31cf
Author: Noble Paul <no...@apache.org>
AuthorDate: Thu May 23 16:59:14 2019 +1000

    Merge remote-tracking branch 'origin/master' into jira/SOLR-13484

 .../src/test/org/apache/lucene/index/TestSegmentToThreadMapping.java | 2 +-
 .../org/apache/solr/cloud/TestStressCloudBlindAtomicUpdates.java     | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)


[lucene-solr] 01/02: SOLR-13484: ref guide

Posted by no...@apache.org.
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.