You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ab...@apache.org on 2019/01/23 13:11:59 UTC

[lucene-solr] branch branch_7x updated (5ac3bbc -> d6c0e9a)

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

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


    from 5ac3bbc  LUCENE-8654: Polygon2D#relateTriangle returns the wrong answer if polygon is inside the triangle
     new 6a4ef4e  SOLR-9735: Fix v2 API for AutoscalingHistoryHandler.
     new d6c0e9a  SOLR-9735: Update CHANGES and the ref guide.

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/CHANGES.txt                                   |  2 +
 .../handler/admin/AutoscalingHistoryHandler.java   | 13 +++++
 .../src/solrcloud-autoscaling-api.adoc             |  6 ---
 .../src/resources/apispec/autoscaling.history.json | 61 ++++++++++++++++++++++
 4 files changed, 76 insertions(+), 6 deletions(-)
 create mode 100644 solr/solrj/src/resources/apispec/autoscaling.history.json


[lucene-solr] 02/02: SOLR-9735: Update CHANGES and the ref guide.

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d6c0e9a8714e21532f6b64ac3756918517723c11
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Wed Jan 23 13:57:07 2019 +0100

    SOLR-9735: Update CHANGES and the ref guide.
---
 solr/CHANGES.txt                                       | 2 ++
 solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc | 6 ------
 2 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 2c32765..01e0145 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -94,6 +94,8 @@ Bug Fixes
 
 * SOLR-11998: RebalanceLeaders API broken response format with wt=JSON (Erick Erickson)
 
+* SOLR-9735: Fix v2 API for AutoscalingHistoryHandler. (ab)
+
 Improvements
 ----------------------
 
diff --git a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
index edb6bd9..d91ddc2 100644
--- a/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
+++ b/solr/solr-ref-guide/src/solrcloud-autoscaling-api.adoc
@@ -303,12 +303,6 @@ An `afterAction` stage.
 }
 ----
 
-.Broken v2 API support
-[WARNING]
-====
-Due to a bug in Solr 7.1.0, the History API is available only at the path `/admin/autoscaling/history`. Using the `/api/cluster/autoscaling/history` endpoint returns an error.
-====
-
 == Write API
 
 The Write API is available at the same `/admin/autoscaling` and `/api/cluster/autoscaling` endpoints as the Read API but can only be used with the *POST* HTTP verb.


[lucene-solr] 01/02: SOLR-9735: Fix v2 API for AutoscalingHistoryHandler.

Posted by ab...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6a4ef4ea3dc67a21508f9b001d088e61e188a407
Author: Andrzej Bialecki <ab...@apache.org>
AuthorDate: Thu Oct 26 12:14:30 2017 +0200

    SOLR-9735: Fix v2 API for AutoscalingHistoryHandler.
---
 .../handler/admin/AutoscalingHistoryHandler.java   | 13 +++++
 .../src/resources/apispec/autoscaling.history.json | 61 ++++++++++++++++++++++
 2 files changed, 74 insertions(+)

diff --git a/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java b/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java
index b494011..0af348f 100644
--- a/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java
+++ b/solr/core/src/java/org/apache/solr/handler/admin/AutoscalingHistoryHandler.java
@@ -18,11 +18,14 @@ package org.apache.solr.handler.admin;
 
 import java.lang.invoke.MethodHandles;
 import java.util.Collections;
+import java.util.Collection;
 import java.util.HashMap;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Optional;
 
+import org.apache.solr.api.Api;
+import org.apache.solr.api.ApiBag;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.response.QueryResponse;
 import org.apache.solr.cloud.autoscaling.SystemLogListener;
@@ -149,4 +152,14 @@ public class AutoscalingHistoryHandler extends RequestHandlerBase implements Per
     return Category.ADMIN;
   }
 
+  @Override
+  public Boolean registerV2() {
+    return Boolean.TRUE;
+  }
+
+  @Override
+  public Collection<Api> getApis() {
+    return ApiBag.wrapRequestHandlers(this, "autoscaling.history");
+  }
+
 }
diff --git a/solr/solrj/src/resources/apispec/autoscaling.history.json b/solr/solrj/src/resources/apispec/autoscaling.history.json
new file mode 100644
index 0000000..dadd6cb
--- /dev/null
+++ b/solr/solrj/src/resources/apispec/autoscaling.history.json
@@ -0,0 +1,61 @@
+{
+  "documentation": "https://lucene.apache.org/solr/guide/solrcloud-autoscaling-api.html",
+  "description": "Autoscaling history handler allows retrieving past autoscaling events recorded in the .system collection.",
+  "methods": [
+    "GET"
+  ],
+  "url": {
+    "paths": [
+      "/cluster/autoscaling/history"
+    ],
+    "params": {
+      "collection": {
+        "type": "string",
+        "description": "Collection where autoscaling events are stored, '.system' by default.",
+        "default": ".system"
+      },
+      "q": {
+        "type": "string",
+        "description": "Arbitrary query to limit the selected events.",
+        "default": "*:*"
+      },
+      "sort": {
+        "type": "string",
+        "description": "Sorting criteria for returned events.",
+        "default": "id asc"
+      },
+      "action": {
+        "type": "string",
+        "description": "Trigger action name to select"
+      },
+      "message": {
+        "type": "string",
+        "description": "Event message to select"
+      },
+      "trigger": {
+        "type": "string",
+        "description": "Trigger name to select"
+      },
+      "type": {
+        "type": "string",
+        "description": "Event type to select"
+      },
+      "node": {
+        "type": "string",
+        "description": "Node name to select"
+      },
+      "stage": {
+        "type": "string",
+        "description": "Processing stage to select"
+      },
+      "beforeAction": {
+        "type": "string",
+        "description": "Action name to select events before the action was executed"
+      },
+      "afterAction": {
+        "type": "string",
+        "description": "Action name to select events after the action was executed"
+      }
+    }
+  }
+}