You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by ha...@apache.org on 2021/03/31 23:43:57 UTC

[skywalking] branch es-client created (now 48a4992)

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

hanahmily pushed a change to branch es-client
in repository https://gitbox.apache.org/repos/asf/skywalking.git.


      at 48a4992  Append the root slash(/) to getIndex and getTemplate requests

This branch includes the following new commits:

     new 48a4992  Append the root slash(/) to getIndex and getTemplate requests

The 1 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.


[skywalking] 01/01: Append the root slash(/) to getIndex and getTemplate requests

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

hanahmily pushed a commit to branch es-client
in repository https://gitbox.apache.org/repos/asf/skywalking.git

commit 48a4992194ddf6eab5faec28abca7f1da3d50e06
Author: Gao Hongtao <ha...@gmail.com>
AuthorDate: Thu Apr 1 07:42:01 2021 +0800

    Append the root slash(/) to getIndex and getTemplate requests
    
    Signed-off-by: Gao Hongtao <ha...@gmail.com>
---
 .../oap/server/library/client/elasticsearch/ElasticSearchClient.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/oap-server/server-library/library-client/src/main/java/org/apache/skywalking/oap/server/library/client/elasticsearch/ElasticSearchClient.java b/oap-server/server-library/library-client/src/main/java/org/apache/skywalking/oap/server/library/client/elasticsearch/ElasticSearchClient.java
index 9f215c3..503fa30 100644
--- a/oap-server/server-library/library-client/src/main/java/org/apache/skywalking/oap/server/library/client/elasticsearch/ElasticSearchClient.java
+++ b/oap-server/server-library/library-client/src/main/java/org/apache/skywalking/oap/server/library/client/elasticsearch/ElasticSearchClient.java
@@ -234,7 +234,7 @@ public class ElasticSearchClient implements Client, HealthCheckable {
         indexName = formatIndexName(indexName);
         try {
             Response response = client.getLowLevelClient()
-                                      .performRequest(HttpGet.METHOD_NAME, indexName);
+                                      .performRequest(HttpGet.METHOD_NAME, "/" + indexName);
             int statusCode = response.getStatusLine().getStatusCode();
             if (statusCode != HttpStatus.SC_OK) {
                 healthChecker.health();
@@ -341,7 +341,7 @@ public class ElasticSearchClient implements Client, HealthCheckable {
         name = formatIndexName(name);
         try {
             Response response = client.getLowLevelClient()
-                                      .performRequest(HttpGet.METHOD_NAME, "_template/" + name);
+                                      .performRequest(HttpGet.METHOD_NAME, "/_template/" + name);
             int statusCode = response.getStatusLine().getStatusCode();
             if (statusCode != HttpStatus.SC_OK) {
                 healthChecker.health();