vernedeng commented on code in PR #5595: URL: https://github.com/apache/inlong/pull/5595#discussion_r956852383
########## inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java: ########## @@ -101,6 +102,8 @@ public class ProxyConfigManager extends Thread { private boolean bShutDown = false; private long doworkTime = 0; private EncryptConfigEntry userEncryConfigEntry; + private final HashRing hashRing = HashRing.getInstance(); + private String loadBalance = ConfigConstants.DEFAULT_LOAD_BALANCE; Review Comment: plz make it configurable ########## inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java: ########## @@ -621,6 +630,14 @@ private ProxyConfigEntry getProxyConfigEntry(DataProxyNodeResponse proxyCluster) if (ObjectUtils.isNotEmpty(proxyCluster.getIsSwitch())) { isSwitch = proxyCluster.getIsSwitch(); } + int virtualNode = ConfigConstants.DEFAULT_VIRTUAL_NODE; Review Comment: plz make it configurable ########## inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/network/ClientMgr.java: ########## @@ -348,6 +351,90 @@ public synchronized NettyClient getClientByRoundRobin() { return client; } + public synchronized NettyClient getClientByRandom() { + NettyClient client; + if (clientList.isEmpty()) { + return null; + } + int currSize = clientList.size(); + int maxRetry = 1000; Review Comment: plz make it configurable ########## inlong-sdk/dataproxy-sdk/src/main/java/org/apache/inlong/sdk/dataproxy/config/ProxyConfigManager.java: ########## @@ -116,6 +119,10 @@ public void setGroupId(String groupId) { this.groupId = groupId; } + public HashRing getHashRing() { Review Comment: why use methond **_getHashRing_** to acquire a singleton instance? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@inlong.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org