You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kylin.apache.org by xx...@apache.org on 2021/07/27 02:30:44 UTC
[kylin] branch master updated: fix bug: retry the same error url
when coordinator leader changes
This is an automated email from the ASF dual-hosted git repository.
xxyu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/kylin.git
The following commit(s) were added to refs/heads/master by this push:
new 435d099 fix bug: retry the same error url when coordinator leader changes
435d099 is described below
commit 435d099dbd36ad24d19882264f11ae9200661e65
Author: liukun4515 <li...@apache.org>
AuthorDate: Tue Jun 29 14:15:03 2021 +0800
fix bug: retry the same error url when coordinator leader changes
---
.../kylin/stream/coordinator/client/HttpCoordinatorClient.java | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/client/HttpCoordinatorClient.java b/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/client/HttpCoordinatorClient.java
index b93cb01..cdd16e0 100644
--- a/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/client/HttpCoordinatorClient.java
+++ b/stream-coordinator/src/main/java/org/apache/kylin/stream/coordinator/client/HttpCoordinatorClient.java
@@ -212,10 +212,10 @@ public class HttpCoordinatorClient implements CoordinatorClient {
}
private Object postRequest(final String path, final String requestContent) throws IOException {
- final String url = getBaseUrl() + path;
CoordinatorResponse response = retryCaller.call(new CoordinatorRetryCallable() {
@Override
public CoordinatorResponse call() throws Exception {
+ final String url = getBaseUrl() + path;
String msg = restService.postRequest(url, requestContent);
return JsonUtil.readValue(msg, CoordinatorResponse.class);
}
@@ -224,10 +224,10 @@ public class HttpCoordinatorClient implements CoordinatorClient {
}
private Object getRequest(String path) throws IOException {
- final String url = getBaseUrl() + path;
CoordinatorResponse response = retryCaller.call(new CoordinatorRetryCallable() {
@Override
public CoordinatorResponse call() throws Exception {
+ final String url = getBaseUrl() + path;
String msg = restService.getRequest(url);
return JsonUtil.readValue(msg, CoordinatorResponse.class);
}
@@ -236,10 +236,10 @@ public class HttpCoordinatorClient implements CoordinatorClient {
}
private Object putRequest(String path) throws IOException {
- final String url = getBaseUrl() + path;
CoordinatorResponse response = retryCaller.call(new CoordinatorRetryCallable() {
@Override
public CoordinatorResponse call() throws Exception {
+ final String url = getBaseUrl() + path;
String msg = restService.putRequest(url);
return JsonUtil.readValue(msg, CoordinatorResponse.class);
}
@@ -248,10 +248,10 @@ public class HttpCoordinatorClient implements CoordinatorClient {
}
private Object deleteRequest(String path) throws IOException {
- final String url = getBaseUrl() + path;
CoordinatorResponse response = retryCaller.call(new CoordinatorRetryCallable() {
@Override
public CoordinatorResponse call() throws Exception {
+ final String url = getBaseUrl() + path;
String msg = restService.deleteRequest(url);
return JsonUtil.readValue(msg, CoordinatorResponse.class);
}