From d9e8bcd8da7a01cbe6c151aaac78bc5f80db7893 Mon Sep 17 00:00:00 2001 From: dcy Date: Fri, 14 Jun 2024 16:07:21 +0800 Subject: [PATCH] Revert "inner-2389: update jar" This reverts commit b431718ee6f612caa3abd395781c5b5190ad4b8a. --- pom.xml | 6 ++--- .../dble/cluster/impl/UcoreSender.java | 26 +++++++++---------- .../cluster/impl/ushard/UshardSender.java | 6 ++--- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index 448e522eac..92ecc60781 100644 --- a/pom.xml +++ b/pom.xml @@ -24,7 +24,7 @@ UTF-8 - 1.53.0 + 1.4.0 2.18.0 @@ -76,7 +76,7 @@ com.google.protobuf protobuf-java - 3.16.3 + 2.6.1 org.iq80.leveldb @@ -198,7 +198,7 @@ com.google.protobuf protobuf-java - 3.16.3 + 3.5.0 diff --git a/src/main/java/com/actiontech/dble/cluster/impl/UcoreSender.java b/src/main/java/com/actiontech/dble/cluster/impl/UcoreSender.java index eb04dc3e61..522783a60f 100644 --- a/src/main/java/com/actiontech/dble/cluster/impl/UcoreSender.java +++ b/src/main/java/com/actiontech/dble/cluster/impl/UcoreSender.java @@ -63,7 +63,7 @@ public void initConInfo(Properties ucoreProperties) { LOGGER.error("error:", e); } Channel channel = ManagedChannelBuilder.forAddress(getIpList().get(0), - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); } @@ -80,7 +80,7 @@ public void initCluster(Properties ucoreProperties) { LOGGER.error("error:", e); } Channel channel = ManagedChannelBuilder.forAddress(getIpList().get(0), - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); startUpdateNodes(); } @@ -139,7 +139,7 @@ private void log(String message, Exception e) { ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); output = stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).lockOnSession(input); return output.getSessionId(); @@ -178,7 +178,7 @@ public void setKV(String path, String value) throws Exception { ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).putKv(input); return; @@ -205,7 +205,7 @@ public KvBean getKV(String path) { ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); output = stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).getKv(input); } catch (Exception e2) { @@ -240,7 +240,7 @@ public List getKVPath(String path) { ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); output = stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).getKvTree(input); } catch (Exception e2) { @@ -275,7 +275,7 @@ public void cleanPath(String path) { ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).deleteKvTree(input); flag = true; @@ -302,7 +302,7 @@ public void cleanKV(String path) { ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).deleteKv(input); return; @@ -330,7 +330,7 @@ public SubscribeReturnBean subscribeKvPrefix(SubscribeRequest request) throws Ex ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(ClusterGeneralConfig.getInstance().getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(ClusterGeneralConfig.getInstance().getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GRPC_SUBTIMEOUT, TimeUnit.SECONDS); UcoreInterface.SubscribeKvPrefixOutput output = stub.withDeadlineAfter(GRPC_SUBTIMEOUT, TimeUnit.SECONDS).subscribeKvPrefix(input); return groupSubscribeResult(output); @@ -355,7 +355,7 @@ public void alert(ClusterAlertBean alert) { for (String ip : getIpList()) { ManagedChannel channel = null; try { - channel = ManagedChannelBuilder.forAddress(ip, Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + channel = ManagedChannelBuilder.forAddress(ip, Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).alert(input); return; @@ -379,7 +379,7 @@ public boolean alertResolve(ClusterAlertBean alert) { for (String ip : getIpList()) { ManagedChannel channel = null; try { - channel = ManagedChannelBuilder.forAddress(ip, Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + channel = ManagedChannelBuilder.forAddress(ip, Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).alertResolve(input); return true; @@ -432,7 +432,7 @@ public boolean renewLock(String sessionId) throws Exception { ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); stub.withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS).renewSession(input); return true; @@ -469,7 +469,7 @@ public UcoreInterface.SubscribeNodesOutput subscribeNodes(UcoreInterface.Subscri ManagedChannel channel = null; try { channel = ManagedChannelBuilder.forAddress(ip, - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = UcoreGrpc.newBlockingStub(channel).withDeadlineAfter(GRPC_SUBTIMEOUT, TimeUnit.SECONDS); return stub.withDeadlineAfter(GRPC_SUBTIMEOUT, TimeUnit.SECONDS).subscribeNodes(subscribeNodesInput); } catch (Exception e2) { diff --git a/src/main/java/com/actiontech/dble/cluster/impl/ushard/UshardSender.java b/src/main/java/com/actiontech/dble/cluster/impl/ushard/UshardSender.java index 3dd8f2b3fa..9359449c8b 100644 --- a/src/main/java/com/actiontech/dble/cluster/impl/ushard/UshardSender.java +++ b/src/main/java/com/actiontech/dble/cluster/impl/ushard/UshardSender.java @@ -41,7 +41,7 @@ public void initConInfo(Properties properties) { serverId = getValue(ClusterParamCfg.CLUSTER_CFG_SERVER_ID); sourceComponentId = getValue(ClusterParamCfg.CLUSTER_CFG_MYID); Channel channel = ManagedChannelBuilder.forAddress("127.0.0.1", - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = DbleClusterGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); } @@ -51,7 +51,7 @@ public void initCluster(Properties properties) { serverId = getValue(ClusterParamCfg.CLUSTER_CFG_SERVER_ID); sourceComponentId = getValue(ClusterParamCfg.CLUSTER_CFG_MYID); Channel channel = ManagedChannelBuilder.forAddress("127.0.0.1", - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = DbleClusterGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); startUpdateNodes(); } @@ -302,7 +302,7 @@ public void run() { } catch (Exception e) { LOGGER.warn("error in ucore nodes watch,try for another time", e); Channel channel = ManagedChannelBuilder.forAddress("127.0.0.1", - Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext().build(); + Integer.parseInt(getValue(ClusterParamCfg.CLUSTER_PLUGINS_PORT))).usePlaintext(true).build(); stub = DbleClusterGrpc.newBlockingStub(channel).withDeadlineAfter(GENERAL_GRPC_TIMEOUT, TimeUnit.SECONDS); } }