From e9cb1e221367c7c96f9fa3384887088a37a8beed Mon Sep 17 00:00:00 2001 From: Jason Gerlowski Date: Thu, 3 Sep 2026 19:41:57 -0400 Subject: [PATCH 1/3] SOLR-18417: Deprecate v1 PingRequestHandler PingRequestHandler has largely been superseded by HealthcheckHandler (or even SystemInfoHandler) which do healthchecks at the node-level instead and tend to be much more compatible with typical load balancers. This commit deprecates PingRequestHandler and the corresponding SolrPing class in SolrJ. Removal will occur in a subsequent ('main'-only) commit. --- .../SOLR-18417-deprecate-pingrequesthandler.yml | 7 +++++++ .../java/org/apache/solr/handler/PingRequestHandler.java | 4 ++++ .../pages/implicit-requesthandlers.adoc | 2 ++ .../modules/deployment-guide/pages/ping.adoc | 6 ++++++ .../org/apache/solr/client/solrj/request/SolrPing.java | 3 +++ .../java/org/apache/solr/common/params/CommonParams.java | 8 +++++++- 6 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml diff --git a/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml b/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml new file mode 100644 index 000000000000..2ca9e87965b3 --- /dev/null +++ b/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml @@ -0,0 +1,7 @@ +type: deprecated +title: Deprecate PingRequestHandler (the "/admin/ping" endpoint) in favor of `/api/node/health` (v2) or `/solr/admin/info/health` (v1). +authors: + - name: Jason Gerlowski +links: + - name: SOLR-18417 + url: https://issues.apache.org/jira/browse/SOLR-18417 diff --git a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java index f7eaa97db78b..ee49eed153d7 100644 --- a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java +++ b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java @@ -105,8 +105,12 @@ * healthcheck file exists ("enabled") or not ("disabled") * * + * @deprecated This handler is deprecated and will be removed in a future release. For load balancer + * or orchestration health checks, use {@link org.apache.solr.handler.admin.HealthCheckHandler} + * instead. instead. * @since solr 1.3 */ +@Deprecated(since = "10.1") public class PingRequestHandler extends RequestHandlerBase implements SolrCoreAware { private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc index 005742a7cec8..6adff4771b7e 100644 --- a/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc +++ b/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc @@ -83,6 +83,8 @@ This handler must have a collection name in the path to the endpoint. Ping:: Health check. This handler must have a collection name in the path to the endpoint. + +CAUTION: `PingRequestHandler` is deprecated and will be removed in a future release. Use the `Health` endpoint below instead. ++ *Documentation*: xref:deployment-guide:ping.adoc[] + [cols="3*.",frame=none,grid=cols,options="header"] diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc index 169fb97e9ab7..558dddac2928 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc @@ -16,6 +16,12 @@ // specific language governing permissions and limitations // under the License. +[WARNING] +==== +The `/admin/ping` endpoint (`PingRequestHandler`) is deprecated and will be removed in a future release. +For load balancer or orchestration health checks, use the `solr/admin/info/health` (v1) or `api/node/health` (v2) endpoint, documented in the "Health" section of xref:configuration-guide:implicit-requesthandlers.adoc[], instead. +==== + Choosing Ping under a core name issues a `ping` request to check whether the core is up and responding to requests. .Ping Option in Core Dropdown diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java index 2b9f9824802e..a08d9c89ec1f 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java @@ -26,8 +26,11 @@ * org.apache.solr.client.solrj.SolrClient}. To use this class, the solrconfig.xml for the relevant * core must include the request handler for /admin/ping. * + * @deprecated PingRequestHandler (the /admin/ping endpoint) is deprecated + * and will be removed in a future release. Use {@link HealthCheckRequest} instead. * @since solr 1.3 */ +@Deprecated(since = "10.1") public class SolrPing extends CollectionRequiringSolrRequest { /** serialVersionUID. */ diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java index 3bed47aac571..31ad4a1e5d76 100644 --- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java +++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java @@ -75,7 +75,13 @@ public interface CommonParams { String INDENT = "indent"; // SOLR-4228 start - /** handler value for SolrPing */ + /** + * handler value for SolrPing + * + * @deprecated PingRequestHandler (the /admin/ping endpoint) is + * deprecated and will be removed in a future release. + */ + @Deprecated(since = "10.1") String PING_HANDLER = "/admin/ping"; /** "action" parameter for SolrPing */ From cbaa4bb5f9ab23d0ef196e200cdfe4f662ca222f Mon Sep 17 00:00:00 2001 From: Jason Gerlowski Date: Thu, 3 Sep 2026 20:20:38 -0400 Subject: [PATCH 2/3] Remove PingRequestHandler-related methods and classes --- .../unreleased/SOLR-18417-deprecate-pingrequesthandler.yml | 2 +- .../src/java/org/apache/solr/client/solrj/SolrClient.java | 4 ++++ .../apache/solr/client/solrj/response/SolrPingResponse.java | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml b/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml index 2ca9e87965b3..fb82ab8f6d1f 100644 --- a/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml +++ b/changelog/unreleased/SOLR-18417-deprecate-pingrequesthandler.yml @@ -1,5 +1,5 @@ type: deprecated -title: Deprecate PingRequestHandler (the "/admin/ping" endpoint) in favor of `/api/node/health` (v2) or `/solr/admin/info/health` (v1). +title: Deprecate PingRequestHandler (the "/admin/ping" endpoint), SolrPing, SolrPingResponse, and SolrClient.ping()/ping(String). authors: - name: Jason Gerlowski links: diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java index 5d54d12155a1..fbc5ef6df2b6 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java @@ -895,7 +895,9 @@ public UpdateResponse deleteByQuery(String query, int commitWithinMs) * response from the server * @throws IOException If there is a low-level I/O error. * @throws SolrServerException if there is an error on the server + * @deprecated This method is deprecated and will be removed in a future release. */ + @Deprecated(since = "10.1") public SolrPingResponse ping(String collection) throws SolrServerException, IOException { return new SolrPing().process(this, collection); } @@ -907,7 +909,9 @@ public SolrPingResponse ping(String collection) throws SolrServerException, IOEx * response from the server * @throws IOException If there is a low-level I/O error. * @throws SolrServerException if there is an error on the server + * @deprecated This method is deprecated and will be removed in a future release. */ + @Deprecated(since = "10.1") public SolrPingResponse ping() throws SolrServerException, IOException { return new SolrPing().process(this, null); } diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java index da124f135943..6c0d8940712b 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java @@ -17,8 +17,10 @@ package org.apache.solr.client.solrj.response; /** + * @deprecated This class is deprecated and will be removed in a future release. * @since solr 1.3 */ +@Deprecated(since = "10.1") public class SolrPingResponse extends SolrResponseBase { // nothing special now... } From ab84479642d4a66d129c60a4aa1357a72f4f9dc3 Mon Sep 17 00:00:00 2001 From: Jason Gerlowski Date: Thu, 3 Sep 2026 21:46:20 -0400 Subject: [PATCH 3/3] SOLR-18417: Remove PingRequestHandler and related code Removes PingRequestHandler, SolrPing, SolrPingResponse, SolrClient.ping(), and various related constants. This follows their deprecation in Solr 10.1. --- .../SOLR-18417-remove-pingrequesthandler.yml | 7 + .../apache/solr/cloud/RecoveryStrategy.java | 3 +- .../solr/handler/PingRequestHandler.java | 343 ------------------ .../apache/solr/metrics/SolrMetricInfo.java | 2 +- solr/core/src/resources/ImplicitPlugins.json | 8 - .../solr/collection1/conf/solrconfig-sql.xml | 10 - .../org/apache/solr/core/SolrCoreTest.java | 2 - .../solr/core/TestSolrConfigHandler.java | 1 - .../solr/handler/PingRequestHandlerTest.java | 233 ------------ .../solr/handler/TestHttpRequestId.java | 4 +- .../solr/handler/admin/TestApiFramework.java | 2 - .../pages/implicit-requesthandlers.adoc | 13 - .../requesthandlers-searchcomponents.adoc | 2 +- .../configuration-guide/pages/v2-api.adoc | 1 - .../deployment-guide/deployment-nav.adoc | 1 - .../UsingPingRefGuideExamplesTest.java | 83 ----- .../deployment-guide/images/ping/ping.png | Bin 10064 -> 0 bytes .../modules/deployment-guide/pages/ping.adoc | 93 ----- .../getting-started/pages/solr-admin-ui.adoc | 1 - .../solrj/jetty/HttpJettySolrClientTest.java | 6 +- .../apache/solr/client/solrj/SolrClient.java | 31 -- .../solr/client/solrj/request/SolrPing.java | 101 ------ .../solrj/response/SolrPingResponse.java | 26 -- .../solr/common/params/CommonParams.java | 20 +- .../solr/collection1/conf/solrconfig-sql.xml | 10 - .../solr/collection1/conf/solrconfig.xml | 10 - .../solr/client/solrj/SolrExampleTests.java | 8 - .../solrj/impl/CloudHttp2SolrClientTest.java | 16 +- .../solrj/impl/HttpJdkSolrClientTest.java | 10 - .../client/solrj/request/SolrPingTest.java | 85 ----- .../PerReplicaStatesIntegrationTest.java | 5 +- .../webapp/AdminUiCollectionScreensTest.java | 3 +- .../AdminUiCoreAdminStandaloneTest.java | 3 +- .../apache/solr/webapp/AdminUiSmokeTest.java | 4 +- solr/webapp/web/index.html | 1 - solr/webapp/web/js/angular/app.js | 10 +- .../js/angular/controllers/core-overview.js | 32 +- solr/webapp/web/js/angular/services.js | 9 - solr/webapp/web/partials/core_overview.html | 22 -- 39 files changed, 27 insertions(+), 1194 deletions(-) create mode 100644 changelog/unreleased/SOLR-18417-remove-pingrequesthandler.yml delete mode 100644 solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java delete mode 100644 solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java delete mode 100644 solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java delete mode 100644 solr/solr-ref-guide/modules/deployment-guide/images/ping/ping.png delete mode 100644 solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc delete mode 100644 solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java delete mode 100644 solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java delete mode 100644 solr/solrj/src/test/org/apache/solr/client/solrj/request/SolrPingTest.java diff --git a/changelog/unreleased/SOLR-18417-remove-pingrequesthandler.yml b/changelog/unreleased/SOLR-18417-remove-pingrequesthandler.yml new file mode 100644 index 000000000000..ad7f8392629f --- /dev/null +++ b/changelog/unreleased/SOLR-18417-remove-pingrequesthandler.yml @@ -0,0 +1,7 @@ +type: removed +title: `PingRequestHandler` (the "/admin/ping" endpoint), `SolrPing`, `SolrPingResponse`, and `SolrClient.ping()` have been removed. Users looking for a healthcheck API can use `/api/node/health` (v2) or `/solr/admin/info/health` (v1) instead. SolrJ users looking to replace "ping" functionality can either use `QueryRequest` for true query submission, or `HealthCheckRequest` for making a node-level healthcheck request. +authors: + - name: Jason Gerlowski +links: + - name: SOLR-18417 + url: https://issues.apache.org/jira/browse/SOLR-18417 diff --git a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java index 64b288ab6add..69fc4ca5f987 100644 --- a/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java +++ b/solr/core/src/java/org/apache/solr/cloud/RecoveryStrategy.java @@ -35,6 +35,7 @@ import org.apache.solr.client.solrj.jetty.HttpJettySolrClient; import org.apache.solr.client.solrj.request.AbstractUpdateRequest; import org.apache.solr.client.solrj.request.CoreAdminRequest.WaitForState; +import org.apache.solr.client.solrj.request.HealthCheckRequest; import org.apache.solr.client.solrj.request.UpdateRequest; import org.apache.solr.common.SolrException; import org.apache.solr.common.SolrException.ErrorCode; @@ -824,7 +825,7 @@ private Replica pingLeader(String ourUrl, CoreDescriptor coreDesc, boolean mayPu try (SolrClient httpSolrClient = recoverySolrClientBuilder(leaderReplica.getBaseUrl(), leaderReplica.getCoreName()) .build()) { - httpSolrClient.ping(); + new HealthCheckRequest().process(httpSolrClient); return leaderReplica; } catch (IOException e) { log.error("Failed to connect leader {} on recovery, try again", leaderReplica.getBaseUrl()); diff --git a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java b/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java deleted file mode 100644 index ee49eed153d7..000000000000 --- a/solr/core/src/java/org/apache/solr/handler/PingRequestHandler.java +++ /dev/null @@ -1,343 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.solr.handler; - -import static org.apache.solr.common.params.CommonParams.ACTION; -import static org.apache.solr.common.params.CommonParams.DISABLE; -import static org.apache.solr.common.params.CommonParams.DISTRIB; -import static org.apache.solr.common.params.CommonParams.ENABLE; - -import java.io.IOException; -import java.lang.invoke.MethodHandles; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.time.Instant; -import java.util.Locale; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.params.CommonParams; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.common.params.ShardParams; -import org.apache.solr.common.params.SolrParams; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.core.SolrCore; -import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.request.SolrRequestHandler; -import org.apache.solr.response.SolrQueryResponse; -import org.apache.solr.security.AuthorizationContext; -import org.apache.solr.util.plugin.SolrCoreAware; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -/** - * Ping Request Handler for reporting SolrCore health to a Load Balancer. - * - *

This handler is designed to be used as the endpoint for an HTTP Load-Balancer to use when - * checking the "health" or "up status" of a Solr server. - * - *

In its simplest form, the PingRequestHandler should be configured with some defaults - * indicating a request that should be executed. If the request succeeds, then the - * PingRequestHandler will respond back with a simple "OK" status. If the request fails, then the - * PingRequestHandler will respond back with the corresponding HTTP Error code. Clients (such as - * load balancers) can be configured to poll the PingRequestHandler monitoring for these types of - * responses (or for a simple connection failure) to know if there is a problem with the Solr - * server. - * - *

Note in case isShard=true, PingRequestHandler respond back with what the delegated handler - * returns (by default it's /select handler). - * - *

- * <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
- *   <lst name="invariants">
- *     <str name="qt">/search</str><!-- handler to delegate to -->
- *     <str name="q">some test query</str>
- *   </lst>
- * </requestHandler>
- * 
- * - *

A more advanced option available, is to configure the handler with a "healthcheckFile" which - * can be used to enable/disable the PingRequestHandler. - * - *

- * <requestHandler name="/admin/ping" class="solr.PingRequestHandler">
- *   <!-- relative paths are resolved against the data dir -->
- *   <str name="healthcheckFile">server-enabled.txt</str>
- *   <lst name="invariants">
- *     <str name="qt">/search</str><!-- handler to delegate to -->
- *     <str name="q">some test query</str>
- *   </lst>
- * </requestHandler>
- * 
- * - *
    - *
  • If the health check file exists, the handler will execute the delegated query and return - * status as described above. - *
  • If the health check file does not exist, the handler will return an HTTP error even if the - * server is working fine and the delegated query would have succeeded - *
- * - *

This health check file feature can be used as a way to indicate to some Load Balancers that - * the server should be "removed from rotation" for maintenance, or upgrades, or whatever reason you - * may wish. - * - *

The health check file may be created/deleted by any external system, or the PingRequestHandler - * itself can be used to create/delete the file by specifying an "action" param in a request: - * - *

    - *
  • http://.../ping?action=enable - creates the health check file if it does not - * already exist - *
  • http://.../ping?action=disable - deletes the health check file if it exists - *
  • http://.../ping?action=status - returns a status code indicating if the - * healthcheck file exists ("enabled") or not ("disabled") - *
- * - * @deprecated This handler is deprecated and will be removed in a future release. For load balancer - * or orchestration health checks, use {@link org.apache.solr.handler.admin.HealthCheckHandler} - * instead. instead. - * @since solr 1.3 - */ -@Deprecated(since = "10.1") -public class PingRequestHandler extends RequestHandlerBase implements SolrCoreAware { - private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass()); - - public static final String HEALTHCHECK_FILE_PARAM = "healthcheckFile"; - - @Override - public Name getPermissionName(AuthorizationContext request) { - String action = request.getParams().get(ACTION, "").strip().toLowerCase(Locale.ROOT); - // Modifying the health check file requires more permission than just doing a ping - switch (action) { - case ENABLE: - case DISABLE: - return Name.CONFIG_EDIT_PERM; - default: - return Name.HEALTH_PERM; - } - } - - protected enum ACTIONS { - STATUS, - ENABLE, - DISABLE, - PING - }; - - private String healthFileName = null; - private Path healthcheck = null; - - @Override - public void init(NamedList args) { - super.init(args); - Object tmp = args.get(HEALTHCHECK_FILE_PARAM); - healthFileName = (null == tmp ? null : tmp.toString()); - } - - @Override - public void inform(SolrCore core) { - if (null != healthFileName) { - healthcheck = Path.of(healthFileName); - if (!healthcheck.isAbsolute()) { - healthcheck = Path.of(core.getDataDir(), healthFileName); - healthcheck = healthcheck.toAbsolutePath(); - } - - if (!Files.isWritable(healthcheck.getParent())) { - // this is not fatal, users may not care about enable/disable via - // solr request, file might be touched/deleted by an external system - log.warn( - "Directory for configured healthcheck file is not writable by solr, PingRequestHandler will not be able to control enable/disable: {}", - healthcheck.getParent().toAbsolutePath()); - } - } - } - - /** - * Returns true if the healthcheck flag-file is enabled but does not exist, otherwise (no file - * configured, or file configured and exists) returns false. - */ - public boolean isPingDisabled() { - return (null != healthcheck && !Files.exists(healthcheck)); - } - - @Override - public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception { - - SolrParams params = req.getParams(); - - // in this case, we want to default distrib to false so - // we only ping the single node - Boolean distrib = params.getBool(DISTRIB); - if (distrib == null) { - ModifiableSolrParams mparams = new ModifiableSolrParams(params); - mparams.set(DISTRIB, false); - req.setParams(mparams); - } - - String actionParam = params.get("action"); - ACTIONS action = null; - if (actionParam == null) { - action = ACTIONS.PING; - } else { - try { - action = ACTIONS.valueOf(actionParam.toUpperCase(Locale.ROOT)); - } catch (IllegalArgumentException iae) { - throw new SolrException( - SolrException.ErrorCode.BAD_REQUEST, "Unknown action: " + actionParam); - } - } - switch (action) { - case PING: - if (isPingDisabled()) { - SolrException e = - new SolrException(SolrException.ErrorCode.SERVICE_UNAVAILABLE, "Service disabled"); - rsp.setException(e); - return; - } - handlePing(req, rsp); - break; - case ENABLE: - handleEnable(true); - break; - case DISABLE: - handleEnable(false); - break; - case STATUS: - if (healthcheck == null) { - SolrException e = - new SolrException( - SolrException.ErrorCode.SERVICE_UNAVAILABLE, "healthcheck not configured"); - rsp.setException(e); - } else { - rsp.add("status", isPingDisabled() ? "disabled" : "enabled"); - } - } - } - - protected void handlePing(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception { - - SolrParams params = req.getParams(); - SolrCore core = req.getCore(); - - // Get the RequestHandler - String qt = params.get(CommonParams.QT); // optional; you get the default otherwise - SolrRequestHandler handler = core.getRequestHandler(qt); - if (handler == null) { - throw new SolrException( - SolrException.ErrorCode.BAD_REQUEST, "Unknown RequestHandler (qt): " + qt); - } - - if (handler instanceof PingRequestHandler) { - // In case it's a query for shard, use default handler - if (params.getBool(ShardParams.IS_SHARD, false)) { - handler = core.getRequestHandler(null); - ModifiableSolrParams wparams = new ModifiableSolrParams(params); - wparams.remove(CommonParams.QT); - req.setParams(wparams); - } else { - throw new SolrException( - SolrException.ErrorCode.BAD_REQUEST, - "Cannot execute the PingRequestHandler recursively"); - } - } - - // Execute the ping query and catch any possible exception - Throwable ex = null; - - // In case it's a query for shard, return the result from delegated handler for distributed - // query to merge result - if (params.getBool(ShardParams.IS_SHARD, false)) { - try { - core.execute(handler, req, rsp); - ex = rsp.getException(); - } catch (Exception e) { - ex = e; - } - // Send an error or return - if (ex != null) { - throw new SolrException( - SolrException.ErrorCode.SERVER_ERROR, - "Ping query caused exception: " + ex.getMessage(), - ex); - } - } else { - try { - SolrQueryResponse pingrsp = new SolrQueryResponse(); - core.execute(handler, req, pingrsp); - ex = pingrsp.getException(); - NamedList headers = rsp.getResponseHeader(); - if (headers != null) { - headers.add("zkConnected", pingrsp.getResponseHeader().get("zkConnected")); - } - - } catch (Exception e) { - ex = e; - } - - // Send an error or an 'OK' message (response code will be 200) - if (ex != null) { - throw new SolrException( - SolrException.ErrorCode.SERVER_ERROR, - "Ping query caused exception: " + ex.getMessage(), - ex); - } - - rsp.add("status", "OK"); - } - } - - protected void handleEnable(boolean enable) throws SolrException { - if (healthcheck == null) { - throw new SolrException( - SolrException.ErrorCode.SERVICE_UNAVAILABLE, "No healthcheck file defined."); - } - if (enable) { - try { - // write out when the file was created - Files.write(healthcheck, Instant.now().toString().getBytes(StandardCharsets.UTF_8)); - } catch (IOException e) { - throw new SolrException( - SolrException.ErrorCode.SERVER_ERROR, "Unable to write healthcheck flag file", e); - } - } else { - try { - Files.deleteIfExists(healthcheck); - } catch (Throwable cause) { - throw new SolrException( - SolrException.ErrorCode.NOT_FOUND, - "Did not successfully delete healthcheck file: " + healthcheck.toAbsolutePath(), - cause); - } - } - } - - //////////////////////// SolrInfoMBeans methods ////////////////////// - - @Override - public String getDescription() { - return "Reports application health to a load-balancer"; - } - - @Override - public Boolean registerV2() { - return Boolean.TRUE; - } - - @Override - public Category getCategory() { - return Category.ADMIN; - } -} diff --git a/solr/core/src/java/org/apache/solr/metrics/SolrMetricInfo.java b/solr/core/src/java/org/apache/solr/metrics/SolrMetricInfo.java index d01dd8f8b31d..2d27780ddbf6 100644 --- a/solr/core/src/java/org/apache/solr/metrics/SolrMetricInfo.java +++ b/solr/core/src/java/org/apache/solr/metrics/SolrMetricInfo.java @@ -29,7 +29,7 @@ public final class SolrMetricInfo { * Creates a new instance of {@link SolrMetricInfo}. * * @param category the category of the metric (e.g. `QUERY`) - * @param scope the scope of the metric (e.g. `/admin/ping`) + * @param scope the scope of the metric (e.g. `/admin/segments`) * @param name the name of the metric (e.g. `Requests`) */ public SolrMetricInfo(SolrInfoBean.Category category, String scope, String name) { diff --git a/solr/core/src/resources/ImplicitPlugins.json b/solr/core/src/resources/ImplicitPlugins.json index a9e8dd45ef4c..638cc8577bf9 100644 --- a/solr/core/src/resources/ImplicitPlugins.json +++ b/solr/core/src/resources/ImplicitPlugins.json @@ -57,14 +57,6 @@ "omitHeader": true } }, - "/admin/ping": { - "class": "solr.PingRequestHandler", - "useParams":"_ADMIN_PING", - "invariants": { - "echoParams": "all", - "q": "{!lucene}*:*" - } - }, "/admin/segments": { "class": "solr.SegmentsInfoRequestHandler", "useParams":"_ADMIN_SEGMENTS" diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xml index d9efb26fa811..d36eb39cc3bf 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-sql.xml @@ -53,14 +53,4 @@ - - - *:* - - - all - - server-enabled.txt - - diff --git a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java index 9fa63f89801f..5a2e6820b3e3 100644 --- a/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java +++ b/solr/core/src/test/org/apache/solr/core/SolrCoreTest.java @@ -97,8 +97,6 @@ public void testImplicitPlugins() { ++ihCount; assertEquals(pathToClassMap.get("/admin/luke"), "solr.LukeRequestHandler"); ++ihCount; - assertEquals(pathToClassMap.get("/admin/ping"), "solr.PingRequestHandler"); - ++ihCount; assertEquals(pathToClassMap.get("/admin/segments"), "solr.SegmentsInfoRequestHandler"); ++ihCount; assertEquals(pathToClassMap.get("/admin/info"), "solr.CoreInfoHandler"); diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java b/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java index 4cb5b8889b6e..68d09f0a6666 100644 --- a/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java +++ b/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java @@ -104,7 +104,6 @@ public void testProperty() throws Exception { assertNotNull(confMap._get(asList("config", "requestHandler", "/admin/luke"), null)); assertNotNull(confMap._get(asList("config", "requestHandler", "/admin/info"), null)); assertNotNull(confMap._get(asList("config", "requestHandler", "/admin/file"), null)); - assertNotNull(confMap._get(asList("config", "requestHandler", "/admin/ping"), null)); String payload = "{\n" diff --git a/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java deleted file mode 100644 index 3f151e51efca..000000000000 --- a/solr/core/src/test/org/apache/solr/handler/PingRequestHandlerTest.java +++ /dev/null @@ -1,233 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.solr.handler; - -import java.io.IOException; -import java.nio.charset.StandardCharsets; -import java.nio.file.Files; -import java.nio.file.Path; -import java.util.List; -import org.apache.solr.SolrTestCaseJ4; -import org.apache.solr.client.solrj.impl.CloudSolrClient; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.SolrPing; -import org.apache.solr.client.solrj.response.SolrPingResponse; -import org.apache.solr.cloud.MiniSolrCloudCluster; -import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.util.NamedList; -import org.apache.solr.embedded.JettyConfig; -import org.apache.solr.embedded.JettySolrRunner; -import org.apache.solr.request.SolrQueryRequest; -import org.apache.solr.response.SolrQueryResponse; -import org.junit.Before; -import org.junit.BeforeClass; - -public class PingRequestHandlerTest extends SolrTestCaseJ4 { - protected int NUM_SERVERS = 5; - protected int NUM_SHARDS = 2; - protected int REPLICATION_FACTOR = 2; - - private final String fileName = this.getClass().getName() + ".server-enabled"; - private Path healthcheckFile = null; - private PingRequestHandler handler = null; - - @BeforeClass - public static void beforeClass() throws Exception { - initCore("solrconfig.xml", "schema.xml"); - } - - @Before - public void before() throws IOException { - // by default, use relative file in dataDir - healthcheckFile = initAndGetDataDir().resolve(fileName); - String fileNameParam = fileName; - - // sometimes randomly use an absolute File path instead - if (random().nextBoolean()) { - fileNameParam = healthcheckFile.toString(); - } - - if (Files.exists(healthcheckFile)) Files.delete(healthcheckFile); - - handler = new PingRequestHandler(); - NamedList initParams = new NamedList<>(); - initParams.add(PingRequestHandler.HEALTHCHECK_FILE_PARAM, fileNameParam); - handler.init(initParams); - handler.inform(h.getCore()); - } - - public void testPingWithNoHealthCheck() throws Exception { - - // for this test, we don't want any healthcheck file configured at all - handler = new PingRequestHandler(); - handler.init(new NamedList<>()); - handler.inform(h.getCore()); - - SolrQueryResponse rsp = null; - - rsp = makeRequest(handler, req()); - assertEquals("OK", rsp.getValues().get("status")); - - rsp = makeRequest(handler, req("action", "ping")); - assertEquals("OK", rsp.getValues().get("status")); - } - - public void testEnablingServer() throws Exception { - - assertFalse(Files.exists(healthcheckFile)); - - // first make sure that ping responds back that the service is disabled - SolrQueryResponse sqr = makeRequest(handler, req()); - SolrException se = (SolrException) sqr.getException(); - assertEquals( - "Response should have been replaced with a 503 SolrException.", - se.code(), - SolrException.ErrorCode.SERVICE_UNAVAILABLE.code); - - // now enable - - makeRequest(handler, req("action", "enable")); - - assertTrue(Files.exists(healthcheckFile)); - assertNotNull(Files.readString(healthcheckFile, StandardCharsets.UTF_8)); - - // now verify that the handler response with success - - SolrQueryResponse rsp = makeRequest(handler, req()); - assertEquals("OK", rsp.getValues().get("status")); - - // enable when already enabled shouldn't cause any problems - makeRequest(handler, req("action", "enable")); - assertTrue(Files.exists(healthcheckFile)); - } - - public void testDisablingServer() throws Exception { - - assertFalse(Files.exists(healthcheckFile)); - - Files.createFile(healthcheckFile); - - // first make sure that ping responds back that the service is enabled - - SolrQueryResponse rsp = makeRequest(handler, req()); - assertEquals("OK", rsp.getValues().get("status")); - - // now disable - - makeRequest(handler, req("action", "disable")); - - assertFalse(Files.exists(healthcheckFile)); - - // now make sure that ping responds back that the service is disabled - SolrQueryResponse sqr = makeRequest(handler, req()); - SolrException se = (SolrException) sqr.getException(); - assertEquals( - "Response should have been replaced with a 503 SolrException.", - se.code(), - SolrException.ErrorCode.SERVICE_UNAVAILABLE.code); - - // disable when already disabled shouldn't cause any problems - makeRequest(handler, req("action", "disable")); - assertFalse(Files.exists(healthcheckFile)); - } - - public void testGettingStatus() throws Exception { - SolrQueryResponse rsp = null; - - handler.handleEnable(true); - - rsp = makeRequest(handler, req("action", "status")); - assertEquals("enabled", rsp.getValues().get("status")); - - handler.handleEnable(false); - - rsp = makeRequest(handler, req("action", "status")); - assertEquals("disabled", rsp.getValues().get("status")); - } - - public void testBadActionRaisesException() { - SolrException se = - expectThrows(SolrException.class, () -> makeRequest(handler, req("action", "badaction"))); - assertEquals(SolrException.ErrorCode.BAD_REQUEST.code, se.code()); - } - - public void testPingInClusterWithNoHealthCheck() throws Exception { - - MiniSolrCloudCluster miniCluster = - new MiniSolrCloudCluster(NUM_SERVERS, createTempDir(), JettyConfig.builder().build()); - - final CloudSolrClient cloudSolrClient = miniCluster.getSolrClient(); - - try { - assertNotNull(miniCluster.getZkServer()); - List jettys = miniCluster.getJettySolrRunners(); - assertEquals(NUM_SERVERS, jettys.size()); - for (JettySolrRunner jetty : jettys) { - assertTrue(jetty.isRunning()); - } - - // create collection - String collectionName = "testSolrCloudCollection"; - String configName = "solrCloudCollectionConfig"; - miniCluster.uploadConfigSet( - SolrTestCaseJ4.TEST_PATH().resolve("collection1").resolve("conf"), configName); - CollectionAdminRequest.createCollection( - collectionName, configName, NUM_SHARDS, REPLICATION_FACTOR) - .setPerReplicaState(SolrCloudTestCase.isPRS()) - .process(miniCluster.getSolrClient()); - - // Send distributed and non-distributed ping query - SolrPingWithDistrib reqDistrib = new SolrPingWithDistrib(); - reqDistrib.setDistrib(true); - SolrPingResponse rsp = reqDistrib.process(cloudSolrClient, collectionName); - assertEquals(0, rsp.getStatus()); - assertTrue(rsp.getResponseHeader().getBooleanArg(("zkConnected"))); - - SolrPing reqNonDistrib = new SolrPing(); - rsp = reqNonDistrib.process(cloudSolrClient, collectionName); - assertEquals(0, rsp.getStatus()); - assertTrue(rsp.getResponseHeader().getBooleanArg(("zkConnected"))); - - } finally { - miniCluster.shutdown(); - } - } - - /** - * Helper Method: Executes the request against the handler, returns the response, and closes the - * request. - */ - private SolrQueryResponse makeRequest(PingRequestHandler handler, SolrQueryRequest req) - throws Exception { - - SolrQueryResponse rsp = new SolrQueryResponse(); - try { - handler.handleRequestBody(req, rsp); - } finally { - req.close(); - } - return rsp; - } - - static class SolrPingWithDistrib extends SolrPing { - public SolrPing setDistrib(boolean distrib) { - getParams().add("distrib", distrib ? "true" : "false"); - return this; - } - } -} diff --git a/solr/core/src/test/org/apache/solr/handler/TestHttpRequestId.java b/solr/core/src/test/org/apache/solr/handler/TestHttpRequestId.java index ef0f486fa30e..aecffaec0f9b 100644 --- a/solr/core/src/test/org/apache/solr/handler/TestHttpRequestId.java +++ b/solr/core/src/test/org/apache/solr/handler/TestHttpRequestId.java @@ -28,7 +28,7 @@ import org.apache.logging.log4j.core.LogEvent; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.client.solrj.jetty.HttpJettySolrClient; -import org.apache.solr.client.solrj.request.SolrPing; +import org.apache.solr.client.solrj.request.HealthCheckRequest; import org.apache.solr.common.util.ExecutorUtil; import org.apache.solr.common.util.NamedList; import org.apache.solr.common.util.SolrNamedThreadFactory; @@ -106,7 +106,7 @@ private void setupClientAndRun( MDC.put(key, value); cf = client - .requestAsync(new SolrPing(), null) + .requestAsync(new HealthCheckRequest(), null) .whenComplete((nl, e) -> assertEquals(value, MDC.get(key))); } finally { ExecutorUtil.shutdownAndAwaitTermination(commExecutor); diff --git a/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java b/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java index 101ee2a09b39..de076bcddc5d 100644 --- a/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java +++ b/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java @@ -60,7 +60,6 @@ import org.apache.solr.common.util.ValidatingJsonMap; import org.apache.solr.core.CoreContainer; import org.apache.solr.core.PluginBag; -import org.apache.solr.handler.PingRequestHandler; import org.apache.solr.handler.SchemaHandler; import org.apache.solr.handler.SolrConfigHandler; import org.apache.solr.request.SolrQueryRequest; @@ -91,7 +90,6 @@ public void testFramework() { new PluginBag<>(SolrRequestHandler.class, null, false); coreHandlers.put("/schema", new SchemaHandler()); coreHandlers.put("/config", new SolrConfigHandler()); - coreHandlers.put("/admin/ping", new PingRequestHandler()); Map parts = new HashMap<>(); String fullPath = "/collections/hello/shards"; diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc index 6adff4771b7e..8f98b352a9fc 100644 --- a/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc +++ b/solr/solr-ref-guide/modules/configuration-guide/pages/implicit-requesthandlers.adoc @@ -80,19 +80,6 @@ This handler must have a collection name in the path to the endpoint. |`solr//admin/luke` |{solr-javadocs}/core/org/apache/solr/handler/admin/LukeRequestHandler.html[LukeRequestHandler] |`_ADMIN_LUKE` |=== -Ping:: Health check. -This handler must have a collection name in the path to the endpoint. -+ -CAUTION: `PingRequestHandler` is deprecated and will be removed in a future release. Use the `Health` endpoint below instead. -+ -*Documentation*: xref:deployment-guide:ping.adoc[] -+ -[cols="3*.",frame=none,grid=cols,options="header"] -|=== -|API Endpoint |Class & Javadocs |Paramset -|`solr//admin/ping` |{solr-javadocs}/core/org/apache/solr/handler/PingRequestHandler.html[PingRequestHandler] |`_ADMIN_PING` -|=== - System Properties:: Return JRE system properties. Secret values are redacted. + diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc index 3fb8b2f9e61b..8a197a4a5b57 100644 --- a/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc +++ b/solr/solr-ref-guide/modules/configuration-guide/pages/requesthandlers-searchcomponents.adoc @@ -19,7 +19,7 @@ After the `` section of `solrconfig.xml`, request handlers and search components are configured. A _request handler_ processes requests coming to Solr. -These might be query requests, index update requests or specialized interactions such as xref:deployment-guide:ping.adoc[]. +These might be queries, index updates, or other admin operations. Not all handlers are defined explicitly in `solrconfig.xml`, many are defined implicitly. See xref:implicit-requesthandlers.adoc[] for details. diff --git a/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc b/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc index 844297cdce09..1c7f9cc8a0f0 100644 --- a/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc +++ b/solr/solr-ref-guide/modules/configuration-guide/pages/v2-api.adoc @@ -129,7 +129,6 @@ Example of introspect for a POST API: `\http://localhost:8983/api/c/gettingstart "/c/gettingstarted/config":["POST", "GET"], "/c/gettingstarted/schema":["POST", "GET"], "/c/gettingstarted/export":["POST", "GET"], - "/c/gettingstarted/admin/ping":["POST", "GET"], "/c/gettingstarted/update":["POST"]} } ---- diff --git a/solr/solr-ref-guide/modules/deployment-guide/deployment-nav.adoc b/solr/solr-ref-guide/modules/deployment-guide/deployment-nav.adoc index 83bb2e286ed6..2794f17a141c 100644 --- a/solr/solr-ref-guide/modules/deployment-guide/deployment-nav.adoc +++ b/solr/solr-ref-guide/modules/deployment-guide/deployment-nav.adoc @@ -57,7 +57,6 @@ * Monitoring Solr ** xref:configuring-logging.adoc[] -** xref:ping.adoc[] ** xref:metrics-reporting.adoc[] ** xref:performance-statistics-reference.adoc[] ** xref:plugins-stats-screen.adoc[] diff --git a/solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java b/solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java deleted file mode 100644 index 71e3f7b25866..000000000000 --- a/solr/solr-ref-guide/modules/deployment-guide/examples/UsingPingRefGuideExamplesTest.java +++ /dev/null @@ -1,83 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -import org.apache.solr.client.solrj.SolrClient; -import org.apache.solr.client.solrj.request.CollectionAdminRequest; -import org.apache.solr.client.solrj.request.SolrPing; -import org.apache.solr.client.solrj.response.SolrPingResponse; -import org.apache.solr.cloud.SolrCloudTestCase; -import org.apache.solr.util.ExternalPaths; -import org.junit.BeforeClass; -import org.junit.Test; - -/** - * Example Ping usage. - * - *

Snippets surrounded by "tag" and "end" comments are extracted and used in the Solr Reference - * Guide. - */ -public class UsingPingRefGuideExamplesTest extends SolrCloudTestCase { - - private static final int NUM_LIVE_NODES = 1; - - @BeforeClass - public static void setUpCluster() throws Exception { - configureCluster(NUM_LIVE_NODES) - .addConfig("conf", ExternalPaths.TECHPRODUCTS_CONFIGSET) - .configure(); - - CollectionAdminRequest.createCollection("techproducts", "conf", 1, 1) - .process(cluster.getSolrClient()); - cluster.waitForActiveCollection("techproducts", 1, 1); - } - - private SolrClient getSolrClient() { - return cluster.getSolrClient(); - } - - @Test - public void solrJExampleWithSolrPing() throws Exception { - - final SolrClient solrClient = getSolrClient(); - String collectionName = "techproducts"; - - // tag::solrj-example-with-solrping[] - SolrPing ping = new SolrPing(); - ping.getParams() - .add("distrib", "true"); // To make it a distributed request against a collection - SolrPingResponse rsp = ping.process(solrClient, collectionName); - String status = (String) rsp.getResponse().get("status"); - // end::solrj-example-with-solrping[] - - assertEquals("OK", status); - } - - @Test - public void solrJExampleWithSolrClient() throws Exception { - - String collectionName = "techproducts"; - - // tag::solrj-example-with-solrclient[] - final SolrClient solrClient = getSolrClient(); - SolrPingResponse pingResponse = solrClient.ping(collectionName); - String status = (String) pingResponse.getResponse().get("status"); - // end::solrj-example-with-solrclient[] - - assertEquals("OK", status); - } -} diff --git a/solr/solr-ref-guide/modules/deployment-guide/images/ping/ping.png b/solr/solr-ref-guide/modules/deployment-guide/images/ping/ping.png deleted file mode 100644 index 055b344546de149d719409e5a00fbaaee42a40a5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 10064 zcmaia1yCH(n)M(-gS)%S;2vC)!F3?G2e(0k%V0x*;F^H|0fM``YX}}7Sa5d;u)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4*yLhkF1hveyEGW!{Y@dh00uE4B>ZxBpuK z!g_~Z@H#gQS|aIttCB%mfPHU%HQ9HS&CLKsgynb|yZxx&j$5gG`&x&;(@*N*#xY+M zMN}c>=R~er$POiomZcp_`{3MGlAA^S(bjWi+xdv-XdKEkfz1b9C{p|iqvI(n!-Fx{ z*jQOH0E(9tPc7``KH=gYF5qOIb99)K^aTTt@SOcmRfz?5!)ovJz_`FMX07|`t#upd zdSOJQ8Y48$KJ&fziWl3c#91Ffn6;MqV1h^fEL~?^aK1VMS5IOu-q5#hmQcd<5kh-@ ze{90q{1!l-UBQjQZUZ7AN|DA8Br`!*!!$9LN^~rQ+rg|dKBLZQJJ)hM5LkX39-UlF z4}csJIvECse!>Ckoet6Wh;Xp(RoACHa^Z1jrJ}xhq&C7_At*ObFN$XLov|7BNWo*o z(fSKerGVfGBgoJdS0&xmj+~+g6Bhb0c5;Y8I;ga!Zt;$2mX%_V%#>jvncz8$vHgtMVnRzx zp>QZIT1n}MQ{zgc)ACSF+~8*S=2@I2Bevd&Cd6??u?K?tnf7b#AMK2Z{Mqf$L|%(4 zzjpi4xJp(f**??iPaN#r(%RgX%nW_|8~^D3%Bck@W}vq=74{y*HUH1fua_Law-*P= q{`IEY{a^bZ|J?)jFRb(1XI6GDe*q67yO)+YfQo{ee1)u8=zjq62%%m8 diff --git a/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc b/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc deleted file mode 100644 index 558dddac2928..000000000000 --- a/solr/solr-ref-guide/modules/deployment-guide/pages/ping.adoc +++ /dev/null @@ -1,93 +0,0 @@ -= Ping -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -[WARNING] -==== -The `/admin/ping` endpoint (`PingRequestHandler`) is deprecated and will be removed in a future release. -For load balancer or orchestration health checks, use the `solr/admin/info/health` (v1) or `api/node/health` (v2) endpoint, documented in the "Health" section of xref:configuration-guide:implicit-requesthandlers.adoc[], instead. -==== - -Choosing Ping under a core name issues a `ping` request to check whether the core is up and responding to requests. - -.Ping Option in Core Dropdown -image::ping/ping.png[image,width=171,height=195] - -The search executed by a Ping is configured with the xref:configuration-guide:request-parameters-api.adoc[]. -See xref:configuration-guide:implicit-requesthandlers.adoc[] for the paramset to use for the `/admin/ping` endpoint. - -The Ping option doesn't open a page, but the status of the request can be seen on the core overview page shown when clicking on a collection name. -The length of time the request has taken is displayed next to the Ping option, in milliseconds. - -== Ping API Examples - -While the UI screen makes it easy to see the ping response time, the underlying ping command can be more useful when executed by remote monitoring tools: - -*Input* - -[source,bash] ----- -http://localhost:8983/solr//admin/ping ----- - -This command will ping the core name for a response. - -*Input* - -[source,bash] ----- -http://localhost:8983/solr//admin/ping?distrib=true&wt=xml ----- - -This command will ping all replicas of the given collection name for a response: - -*Sample Output* - -[source,xml] ----- - - - 0 - 13 - - {!lucene}*:* - false - _text_ - 10 - all - - - OK - ----- - -Both API calls have the same output. -A status=OK indicates that the nodes are responding. - -*SolrJ Example with SolrPing* - -[source,java,indent=0] ----- -include::example$UsingPingRefGuideExamplesTest.java[tag=solrj-example-with-solrping] ----- - -*SolrJ Example with SolrClient* - -[source,java,indent=0] ----- -include::example$UsingPingRefGuideExamplesTest.java[tag=solrj-example-with-solrclient] ----- diff --git a/solr/solr-ref-guide/modules/getting-started/pages/solr-admin-ui.adoc b/solr/solr-ref-guide/modules/getting-started/pages/solr-admin-ui.adoc index 715047bec86f..7d08890c591d 100644 --- a/solr/solr-ref-guide/modules/getting-started/pages/solr-admin-ui.adoc +++ b/solr/solr-ref-guide/modules/getting-started/pages/solr-admin-ui.adoc @@ -179,7 +179,6 @@ Here are sections throughout the Guide describing each screen of the Admin UI: // tag::ui-core-tools[] [cols="1,1",frame=none,grid=none,stripes=none] |=== -| xref:deployment-guide:ping.adoc[]: Ping a named core to determine whether it is active. | xref:deployment-guide:plugins-stats-screen.adoc[]: Statistics for request handlers, search components, plugins, and other installed components. | xref:deployment-guide:user-managed-index-replication.adoc#replication-screen[Replication Screen]: Enable replication for a core and view current replication status. | xref:configuration-guide:index-segments-merging.adoc#segments-info-screen[Segments Info Screen]: Visualization of the underlying Lucene index segments. diff --git a/solr/solrj-jetty/src/test/org/apache/solr/client/solrj/jetty/HttpJettySolrClientTest.java b/solr/solrj-jetty/src/test/org/apache/solr/client/solrj/jetty/HttpJettySolrClientTest.java index 6a3be4726776..878827cf2dea 100644 --- a/solr/solrj-jetty/src/test/org/apache/solr/client/solrj/jetty/HttpJettySolrClientTest.java +++ b/solr/solrj-jetty/src/test/org/apache/solr/client/solrj/jetty/HttpJettySolrClientTest.java @@ -36,10 +36,10 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.impl.HttpSolrClientTestBase; import org.apache.solr.client.solrj.request.ContentWriterUpdateRequest; +import org.apache.solr.client.solrj.request.HealthCheckRequest; import org.apache.solr.client.solrj.request.JavaBinRequestWriter; import org.apache.solr.client.solrj.request.QueryRequest; import org.apache.solr.client.solrj.request.RequestWriter; -import org.apache.solr.client.solrj.request.SolrPing; import org.apache.solr.client.solrj.request.SolrQuery; import org.apache.solr.client.solrj.request.XMLRequestWriter; import org.apache.solr.client.solrj.response.InputStreamResponseParser; @@ -177,7 +177,9 @@ public void testSolrExceptionWithNullBaseurl() throws IOException, SolrServerExc try { // if client base url is null, request url will be used in exception message client.requestWithBaseUrl( - solrTestRule.getBaseUrl() + DEBUG_SERVLET_PATH, new SolrPing(), DEFAULT_COLLECTION); + solrTestRule.getBaseUrl() + DEBUG_SERVLET_PATH, + new HealthCheckRequest(), + DEFAULT_COLLECTION); fail("Didn't get excepted exception from oversided request"); } catch (SolrException e) { diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java index fbc5ef6df2b6..6d67b742cc7a 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/SolrClient.java @@ -26,12 +26,10 @@ import org.apache.solr.client.solrj.SolrRequest.METHOD; import org.apache.solr.client.solrj.beans.DocumentObjectBinder; import org.apache.solr.client.solrj.request.QueryRequest; -import org.apache.solr.client.solrj.request.SolrPing; import org.apache.solr.client.solrj.request.UpdateRequest; import org.apache.solr.client.solrj.response.FastStreamingDocsCallback; import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.client.solrj.response.ResponseParser; -import org.apache.solr.client.solrj.response.SolrPingResponse; import org.apache.solr.client.solrj.response.StreamingJavaBinResponseParser; import org.apache.solr.client.solrj.response.StreamingResponseCallback; import org.apache.solr.client.solrj.response.UpdateResponse; @@ -887,35 +885,6 @@ public UpdateResponse deleteByQuery(String query, int commitWithinMs) return deleteByQuery(null, query, commitWithinMs); } - /** - * Issues a ping request to check if the collection's replicas are alive - * - * @param collection collection to ping - * @return a {@link org.apache.solr.client.solrj.response.SolrPingResponse} containing the - * response from the server - * @throws IOException If there is a low-level I/O error. - * @throws SolrServerException if there is an error on the server - * @deprecated This method is deprecated and will be removed in a future release. - */ - @Deprecated(since = "10.1") - public SolrPingResponse ping(String collection) throws SolrServerException, IOException { - return new SolrPing().process(this, collection); - } - - /** - * Issues a ping request to check if the server is alive - * - * @return a {@link org.apache.solr.client.solrj.response.SolrPingResponse} containing the - * response from the server - * @throws IOException If there is a low-level I/O error. - * @throws SolrServerException if there is an error on the server - * @deprecated This method is deprecated and will be removed in a future release. - */ - @Deprecated(since = "10.1") - public SolrPingResponse ping() throws SolrServerException, IOException { - return new SolrPing().process(this, null); - } - /** * Performs a query to the Solr server * diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java b/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java deleted file mode 100644 index a08d9c89ec1f..000000000000 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/request/SolrPing.java +++ /dev/null @@ -1,101 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.solr.client.solrj.request; - -import org.apache.solr.client.solrj.response.SolrPingResponse; -import org.apache.solr.common.params.CommonParams; -import org.apache.solr.common.params.ModifiableSolrParams; -import org.apache.solr.common.util.NamedList; - -/** - * Verify that there is a working Solr core at the URL of a {@link - * org.apache.solr.client.solrj.SolrClient}. To use this class, the solrconfig.xml for the relevant - * core must include the request handler for /admin/ping. - * - * @deprecated PingRequestHandler (the /admin/ping endpoint) is deprecated - * and will be removed in a future release. Use {@link HealthCheckRequest} instead. - * @since solr 1.3 - */ -@Deprecated(since = "10.1") -public class SolrPing extends CollectionRequiringSolrRequest { - - /** serialVersionUID. */ - private static final long serialVersionUID = 5828246236669090017L; - - /** Request parameters. */ - private final ModifiableSolrParams params; - - /** Create a new SolrPing object. */ - public SolrPing() { - super(METHOD.GET, CommonParams.PING_HANDLER, SolrRequestType.ADMIN); - params = new ModifiableSolrParams(); - } - - @Override - protected SolrPingResponse createResponse(NamedList namedList) { - return new SolrPingResponse(); - } - - @Override - public ModifiableSolrParams getParams() { - return params; - } - - /** - * Remove the action parameter from this request. This will result in the same behavior as {@code - * SolrPing#setActionPing()}. For Solr server version 4.0 and later. - * - * @return this - */ - public SolrPing removeAction() { - params.remove(CommonParams.ACTION); - return this; - } - - /** - * Set the action parameter on this request to enable. This will delete the health-check file for - * the Solr core. For Solr server version 4.0 and later. - * - * @return this - */ - public SolrPing setActionDisable() { - params.set(CommonParams.ACTION, CommonParams.DISABLE); - return this; - } - - /** - * Set the action parameter on this request to enable. This will create the health-check file for - * the Solr core. For Solr server version 4.0 and later. - * - * @return this - */ - public SolrPing setActionEnable() { - params.set(CommonParams.ACTION, CommonParams.ENABLE); - return this; - } - - /** - * Set the action parameter on this request to ping. This is the same as not including the action - * at all. For Solr server version 4.0 and later. - * - * @return this - */ - public SolrPing setActionPing() { - params.set(CommonParams.ACTION, CommonParams.PING); - return this; - } -} diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java b/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java deleted file mode 100644 index 6c0d8940712b..000000000000 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/response/SolrPingResponse.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.solr.client.solrj.response; - -/** - * @deprecated This class is deprecated and will be removed in a future release. - * @since solr 1.3 - */ -@Deprecated(since = "10.1") -public class SolrPingResponse extends SolrResponseBase { - // nothing special now... -} diff --git a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java index 31ad4a1e5d76..827f4d7f14d4 100644 --- a/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java +++ b/solr/solrj/src/java/org/apache/solr/common/params/CommonParams.java @@ -75,27 +75,9 @@ public interface CommonParams { String INDENT = "indent"; // SOLR-4228 start - /** - * handler value for SolrPing - * - * @deprecated PingRequestHandler (the /admin/ping endpoint) is - * deprecated and will be removed in a future release. - */ - @Deprecated(since = "10.1") - String PING_HANDLER = "/admin/ping"; - - /** "action" parameter for SolrPing */ + /** "action" parameter name, used by several admin/collection-management APIs */ String ACTION = "action"; - /** "disable" value for SolrPing action */ - String DISABLE = "disable"; - - /** "enable" value for SolrPing action */ - String ENABLE = "enable"; - - /** "ping" value for SolrPing action */ - String PING = "ping"; - // SOLR-4228 end /** query and init param for field list */ diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml index 5877db808885..cad80102cf44 100644 --- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml +++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig-sql.xml @@ -53,14 +53,4 @@ - - - *:* - - - all - - server-enabled.txt - - diff --git a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml index bce00fec07ab..40b0b626b0ec 100644 --- a/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml +++ b/solr/solrj/src/test-files/solrj/solr/collection1/conf/solrconfig.xml @@ -41,14 +41,4 @@ - - - *:* - - - all - - server-enabled.txt - - diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java index b72ea5ba5a69..8c762cd01905 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java @@ -1156,14 +1156,6 @@ public void testStatistics() throws Exception { assertEquals("they have the same distribution", inStockF.getStddev(), inStockT.getStddev()); } - @Test - public void testPingHandler() throws Exception { - SolrClient client = getSolrClient(); - - // should be ok - client.ping(); - } - @Test public void testFaceting() throws Exception { SolrClient client = getSolrClient(); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java index 94ca36f2b153..341801cb344a 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/CloudHttp2SolrClientTest.java @@ -52,7 +52,6 @@ import org.apache.solr.client.solrj.request.V2Request; import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.client.solrj.response.RequestStatusState; -import org.apache.solr.client.solrj.response.SolrPingResponse; import org.apache.solr.client.solrj.response.UpdateResponse; import org.apache.solr.cloud.AbstractFullDistribZkTestBase; import org.apache.solr.cloud.SolrCloudTestCase; @@ -1215,19 +1214,6 @@ private void queryWithPreferReplicaTypes( } } - @Test - public void testPing() throws Exception { - final String testCollection = "ping_test"; - CollectionAdminRequest.createCollection(testCollection, "conf", 2, 1) - .process(cluster.getSolrClient()); - cluster.waitForActiveCollection(testCollection, 2, 2); - final SolrClient clientUnderTest = getRandomClient(); - - final SolrPingResponse response = clientUnderTest.ping(testCollection); - - assertEquals("This should be OK", 0, response.getStatus()); - } - public void testPerReplicaStateCollection() throws Exception { String collection = getSaferTestName(); @@ -1243,7 +1229,7 @@ public void testPerReplicaStateCollection() throws Exception { .process(cluster.getSolrClient()); cluster.waitForActiveCollection(testCollection, 2, 4); final SolrClient clientUnderTest = getRandomClient(); - final SolrPingResponse response = clientUnderTest.ping(testCollection); + final QueryResponse response = clientUnderTest.query(testCollection, new SolrQuery("*:*")); assertEquals("This should be OK", 0, response.getStatus()); DocCollection c = cluster.getZkStateReader().getCollection(testCollection); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpJdkSolrClientTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpJdkSolrClientTest.java index 9f9233f375e8..c18277bed2b0 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpJdkSolrClientTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/HttpJdkSolrClientTest.java @@ -51,7 +51,6 @@ import org.apache.solr.client.solrj.request.json.JsonQueryRequest; import org.apache.solr.client.solrj.response.JavaBinResponseParser; import org.apache.solr.client.solrj.response.ResponseParser; -import org.apache.solr.client.solrj.response.SolrPingResponse; import org.apache.solr.client.solrj.response.XMLResponseParser; import org.apache.solr.common.params.CommonParams; import org.apache.solr.common.params.MapSolrParams; @@ -614,15 +613,6 @@ public void testCookieHandlerSettingHonored() throws Exception { } } - @Test - public void testPing() throws Exception { - try (HttpJdkSolrClient client = builder(solrTestRule.getBaseUrl()).build()) { - SolrPingResponse spr = client.ping("collection1"); - assertEquals(0, spr.getStatus()); - assertNull(spr.getException()); - } - } - @Test public void testMaybeTryHeadRequestHasContentType() throws Exception { DebugServlet.clear(); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/request/SolrPingTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/request/SolrPingTest.java deleted file mode 100644 index 721a94925390..000000000000 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/request/SolrPingTest.java +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.apache.solr.client.solrj.request; - -import java.nio.file.Path; -import org.apache.solr.SolrTestCase; -import org.apache.solr.SolrTestCaseJ4; -import org.apache.solr.client.solrj.response.SolrPingResponse; -import org.apache.solr.common.SolrException; -import org.apache.solr.common.SolrInputDocument; -import org.apache.solr.util.EmbeddedSolrServerTestRule; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.ClassRule; -import org.junit.Test; - -/** Test SolrPing in Solrj */ -public class SolrPingTest extends SolrTestCase { - - @ClassRule - public static final EmbeddedSolrServerTestRule solrTestRule = new EmbeddedSolrServerTestRule(); - - @BeforeClass - public static void beforeClass() throws Exception { - Path solrHome = SolrTestCaseJ4.getFile("solrj/solr"); - solrTestRule.startSolr(solrHome); - - SolrTestCaseJ4.newRandomConfig(); - solrTestRule.newCollection().withConfigSet(solrHome.resolve("collection1")).create(); - } - - @Before - @Override - public void setUp() throws Exception { - super.setUp(); - solrTestRule.clearIndex(); - - SolrInputDocument doc = new SolrInputDocument(); - doc.setField("id", 1); - doc.setField("terms_s", "samsung"); - solrTestRule.getSolrClient().add(doc); - solrTestRule.getSolrClient().commit(true, true); - } - - @Test - public void testEnabledSolrPing() throws Exception { - SolrPing ping = new SolrPing(); - SolrPingResponse rsp = null; - ping.setActionEnable(); - ping.process(solrTestRule.getSolrClient()); - ping.removeAction(); - rsp = ping.process(solrTestRule.getSolrClient()); - assertNotNull(rsp); - } - - @Test(expected = SolrException.class) - public void testDisabledSolrPing() throws Exception { - SolrPing ping = new SolrPing(); - SolrPingResponse rsp = null; - ping.setActionDisable(); - try { - ping.process(solrTestRule.getSolrClient()); - } catch (Exception e) { - throw new Exception("disable action failed!"); - } - ping.setActionPing(); - rsp = ping.process(solrTestRule.getSolrClient()); - // the above line should fail with a 503 SolrException. - assertNotNull(rsp); - } -} diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java b/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java index 009857689d11..51ef301b2e22 100644 --- a/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java +++ b/solr/solrj/src/test/org/apache/solr/common/cloud/PerReplicaStatesIntegrationTest.java @@ -27,9 +27,10 @@ import org.apache.lucene.tests.util.LuceneTestCase.Nightly; import org.apache.solr.client.solrj.SolrClient; import org.apache.solr.client.solrj.request.CollectionAdminRequest; +import org.apache.solr.client.solrj.request.SolrQuery; import org.apache.solr.client.solrj.request.V2Request; import org.apache.solr.client.solrj.response.CollectionAdminResponse; -import org.apache.solr.client.solrj.response.SolrPingResponse; +import org.apache.solr.client.solrj.response.QueryResponse; import org.apache.solr.cloud.MiniSolrCloudCluster; import org.apache.solr.cloud.SolrCloudTestCase; import org.apache.solr.common.NavigableObject; @@ -78,7 +79,7 @@ public void testPerReplicaStateCollection() throws Exception { .process(cluster.getSolrClient()); cluster.waitForActiveCollection(testCollection, 2, 4); final SolrClient clientUnderTest = cluster.getSolrClient(); - final SolrPingResponse response = clientUnderTest.ping(testCollection); + final QueryResponse response = clientUnderTest.query(testCollection, new SolrQuery("*:*")); assertEquals("This should be OK", 0, response.getStatus()); DocCollection c = cluster.getZkStateReader().getCollection(testCollection); c.forEachReplica((s, replica) -> assertNotNull(replica.getReplicaState())); diff --git a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionScreensTest.java b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionScreensTest.java index f758d46e11b4..274288f5879f 100644 --- a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionScreensTest.java +++ b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCollectionScreensTest.java @@ -101,7 +101,6 @@ public void testCoreOverviewShowsStats() { openPage(coreName + "/core-overview", By.id("dashboard")); waitForPageContains("Num Docs"); waitForPageContains(Integer.toString(NUM_DOCS)); - // the ping widget answers 503 when the configset has no healthcheck file - assertNoSevereConsoleErrors("/admin/ping"); + assertNoSevereConsoleErrors(); } } diff --git a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCoreAdminStandaloneTest.java b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCoreAdminStandaloneTest.java index 0508fd636e79..f0c3b715cc0a 100644 --- a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCoreAdminStandaloneTest.java +++ b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiCoreAdminStandaloneTest.java @@ -63,8 +63,7 @@ public void testStandaloneMenus() { openPage("swapa/core-overview", By.id("dashboard")); waitFor(By.cssSelector("#core-menu .query")); waitFor(By.cssSelector("#core-menu .replication")); - // the ping widget answers 503 when the configset has no healthcheck file - assertNoSevereConsoleErrors("/admin/ping"); + assertNoSevereConsoleErrors(); } @Test diff --git a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSmokeTest.java b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSmokeTest.java index 5dfc5b2a4517..a20059160181 100644 --- a/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSmokeTest.java +++ b/solr/webapp/src/test/org/apache/solr/webapp/AdminUiSmokeTest.java @@ -91,9 +91,7 @@ public void testCoreScreens() { coreName + "/plugins", By.id("plugins"), coreName + "/segments", By.id("segments")); screens.forEach(this::smoke); - // the ping widget on the overview answers 503 when no healthcheck file is configured, - // as is the case for the _default configset - smoke(coreName + "/core-overview", By.id("dashboard"), "/admin/ping"); + smoke(coreName + "/core-overview", By.id("dashboard")); } private void smoke(String route, By anchor) { diff --git a/solr/webapp/web/index.html b/solr/webapp/web/index.html index 46535d6b7427..2b136be845b0 100644 --- a/solr/webapp/web/index.html +++ b/solr/webapp/web/index.html @@ -250,7 +250,6 @@

Connection recovered...

  • Documents
  • Paramsets
  • Files
  • -
  • Ping ({{pingMS}}ms)
  • Plugins / Stats
  • Query
  • Replication
  • diff --git a/solr/webapp/web/js/angular/app.js b/solr/webapp/web/js/angular/app.js index 27a2f458682f..2af813f9b187 100644 --- a/solr/webapp/web/js/angular/app.js +++ b/solr/webapp/web/js/angular/app.js @@ -510,7 +510,7 @@ solrAdminApp.config([ }; }); -solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $location, $timeout, CoresV2, CollectionsV2, AliasesV2, SystemV2, Ping, Constants, SchemaDesigner, ApiErrorHandler) { +solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $location, $timeout, CoresV2, CollectionsV2, AliasesV2, SystemV2, Constants, SchemaDesigner, ApiErrorHandler) { $rootScope.exceptions={}; @@ -640,14 +640,6 @@ solrAdminApp.controller('MainController', function($scope, $route, $rootScope, $ return selectedColl && selectedColl.type === 'alias' && selectedColl.collections.includes(','); }; - $scope.ping = function() { - Ping.ping({core: $scope.currentCore.name}, function(data) { - $scope.showPing = true; - $scope.pingMS = data.responseHeader.QTime; - }); - // @todo .attr( 'title', '/admin/ping is not configured (' + xhr.status + ': ' + error_thrown + ')' ); - }; - $scope.dumpCloud = function() { $scope.$broadcast("cloud-dump"); } diff --git a/solr/webapp/web/js/angular/controllers/core-overview.js b/solr/webapp/web/js/angular/controllers/core-overview.js index 4c97e6d12b07..5b0f59909426 100644 --- a/solr/webapp/web/js/angular/controllers/core-overview.js +++ b/solr/webapp/web/js/angular/controllers/core-overview.js @@ -16,7 +16,7 @@ */ solrAdminApp.controller('CoreOverviewController', -function($scope, $rootScope, $routeParams, Luke, CoreInfo, Update, Replication, Ping, Constants) { +function($scope, $rootScope, $routeParams, Luke, CoreInfo, Update, Replication, Constants) { $scope.resetMenu("overview", Constants.IS_CORE_PAGE); $scope.refreshIndex = function() { Luke.index({core: $routeParams.core}, @@ -54,40 +54,10 @@ function($scope, $rootScope, $routeParams, Luke, CoreInfo, Update, Replication, ); }; - $scope.refreshPing = function() { - Ping.status({core: $routeParams.core}, function(data) { - if (data.error) { - $scope.healthcheckStatus = false; - if (data.error.code == 503) { - $scope.healthcheckMessage = 'Ping request handler is not configured with a healthcheck file.'; - } - } else { - $scope.healthcheckStatus = data.status == "enabled"; - } - }); - }; - - $scope.toggleHealthcheck = function() { - if ($scope.healthcheckStatus) { - Ping.disable( - {core: $routeParams.core}, - function(data) {$scope.healthcheckStatus = false}, - function(error) {$scope.healthcheckMessage = error} - ); - } else { - Ping.enable( - {core: $routeParams.core}, - function(data) {$scope.healthcheckStatus = true}, - function(error) {$scope.healthcheckMessage = error} - ); - } - }; - $scope.refresh = function() { $scope.refreshIndex(); $scope.refreshReplication(); $scope.refreshInfo(); - $scope.refreshPing(); }; $scope.refresh(); diff --git a/solr/webapp/web/js/angular/services.js b/solr/webapp/web/js/angular/services.js index f75a2f9d3c6c..269e3028ce2a 100644 --- a/solr/webapp/web/js/angular/services.js +++ b/solr/webapp/web/js/angular/services.js @@ -304,15 +304,6 @@ solrAdminServices.factory('Metrics', "field": {params: {"analysis.showmatch": true}} }); }]) -.factory('Ping', - ['$resource', function($resource) { - return $resource(':core/admin/ping', {wt:'json', core: '@core', ts:Date.now(), _:Date.now()}, { - "ping": {}, - "enable": {params:{action:"enable"}, headers: {doNotIntercept: "true"}}, - "disable": {params:{action:"disable"}, headers: {doNotIntercept: "true"}}, - "status": {params:{action:"status"}, headers: {doNotIntercept: "true"} - }}); - }]) .factory('Files', ['$resource', function($resource) { return $resource(':core/admin/file', {'wt':'json', core: '@core', '_':Date.now()}, { diff --git a/solr/webapp/web/partials/core_overview.html b/solr/webapp/web/partials/core_overview.html index a17b5aa0caba..11349b375e6e 100644 --- a/solr/webapp/web/partials/core_overview.html +++ b/solr/webapp/web/partials/core_overview.html @@ -174,28 +174,6 @@

    -
    - -

    Healthcheck

    - -
    -
    {{healthcheckMessage}}
    -
    - -
    -
    - -
    Status:
    -
    - -
    -
    - -
    -
    -
    - -