You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/05/30 06:22:34 UTC
[incubator-inlong] branch master updated: [INLONG-4400][SDK] Unified dataproxy sdk clusterId property name (#4401)
This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 9aab63b8a [INLONG-4400][SDK] Unified dataproxy sdk clusterId property name (#4401)
9aab63b8a is described below
commit 9aab63b8a6d589bf5ebc24595c83530a018b7729
Author: xuesongxs <54...@users.noreply.github.com>
AuthorDate: Mon May 30 14:22:29 2022 +0800
[INLONG-4400][SDK] Unified dataproxy sdk clusterId property name (#4401)
---
.../org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java | 4 ++--
.../org/apache/inlong/sdk/dataproxy/example/HttpClientExample.java | 2 +-
.../org/apache/inlong/sdk/dataproxy/example/TcpClientExample.java | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java b/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java
index 92c32e948..587579a84 100644
--- a/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java
+++ b/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java
@@ -588,8 +588,8 @@ public class ProxyConfigManager extends Thread {
Map<String, Integer> streamIdMap = getStreamIdMap(localProxyAddrJson);
proxyEntry.setGroupIdNumAndStreamIdNumMap(groupIdNum, streamIdMap);
proxyEntry.setLoad(load);
- if (localProxyAddrJson.has("cluster_id")) {
- proxyEntry.setClusterId(localProxyAddrJson.get("cluster_id").getAsString());
+ if (localProxyAddrJson.has("clusterId")) {
+ proxyEntry.setClusterId(localProxyAddrJson.get("clusterId").getAsString());
}
return proxyEntry;
}
diff --git a/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/HttpClientExample.java b/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/HttpClientExample.java
index be34225cc..d12924155 100644
--- a/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/HttpClientExample.java
+++ b/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/HttpClientExample.java
@@ -38,7 +38,7 @@ public class HttpClientExample {
* so config file is :
* /data/inlong/dataproxy/conf/test.local
* and config context like this:
- * {"isInterVisit":1,"cluster_id":"1","size":1,"switch":1,"address":[{"host":"127.0.0
+ * {"isInterVisit":1,"clusterId":"1","size":1,"switch":1,"address":[{"host":"127.0.0
* .1","port":"46802"},{"host":"127.0.0.1","port":"46802"}]}
*
* 2. if 'isLocalVisit' is false
diff --git a/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/TcpClientExample.java b/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/TcpClientExample.java
index 415bc3f52..3dda2bd6b 100644
--- a/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/TcpClientExample.java
+++ b/inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/example/TcpClientExample.java
@@ -51,7 +51,7 @@ public class TcpClientExample {
* for example:
* /data/inlong/config/test_test.local
* and file context like this:
- * {"isInterVisit":1,"cluster_id":"1","size":1,"switch":1,"address":[{"host":"127.0.0.1",
+ * {"isInterVisit":1,"clusterId":"1","size":1,"switch":1,"address":[{"host":"127.0.0.1",
* "port":"46802"},{"host":"127.0.0.1","port":"46802"}]}
* 2. if isLocalVisit is false, will get dataproxy server info from manager
* so we must ensure that the manager server url is configured correctly!