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

tanxinyu pushed a commit to branch rc/1.3.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/rc/1.3.3 by this push:
     new 6406f238047 [to rc/1.3.3] Modify message of unsupported 
DataNode->ConfigNode RPC (CP 13945) #13948
6406f238047 is described below

commit 6406f23804796dc8c8735c571e562672893eeec6
Author: Li Yu Heng <[email protected]>
AuthorDate: Tue Oct 29 16:55:40 2024 +0800

    [to rc/1.3.3] Modify message of unsupported DataNode->ConfigNode RPC (CP 
13945) #13948
---
 .../apache/iotdb/db/protocol/client/ConfigNodeClient.java | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
index d146712ecf1..042efde5e04 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/protocol/client/ConfigNodeClient.java
@@ -191,6 +191,9 @@ public class ConfigNodeClient implements 
IConfigNodeRPCService.Iface, ThriftClie
   private static final long RETRY_INTERVAL_MS = 1000L;
   private static final long WAIT_CN_LEADER_ELECTION_INTERVAL_MS = 2000L;
 
+  private static final String UNSUPPORTED_INVOCATION =
+      "This method is not supported for invocation by DataNode";
+
   private final ThriftClientProperty property;
 
   private IConfigNodeRPCService.Iface client;
@@ -462,17 +465,17 @@ public class ConfigNodeClient implements 
IConfigNodeRPCService.Iface, ThriftClie
 
   @Override
   public TAINodeRegisterResp registerAINode(TAINodeRegisterReq req) throws 
TException {
-    throw new UnsupportedOperationException("RegisterAINode method is not 
supported in datanode");
+    throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
   }
 
   @Override
   public TAINodeRestartResp restartAINode(TAINodeRestartReq req) throws 
TException {
-    throw new UnsupportedOperationException("RestartAINode method is not 
supported in datanode");
+    throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
   }
 
   @Override
   public TSStatus removeAINode(TAINodeRemoveReq req) throws TException {
-    throw new UnsupportedOperationException("RemoveAINode method is not 
supported in datanode");
+    throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
   }
 
   @Override
@@ -483,8 +486,7 @@ public class ConfigNodeClient implements 
IConfigNodeRPCService.Iface, ThriftClie
 
   @Override
   public TAINodeConfigurationResp getAINodeConfiguration(int aiNodeId) throws 
TException {
-    throw new UnsupportedOperationException(
-        "GetAINodeConfiguration method is not supported in datanode");
+    throw new UnsupportedOperationException(UNSUPPORTED_INVOCATION);
   }
 
   @Override
@@ -750,7 +752,8 @@ public class ConfigNodeClient implements 
IConfigNodeRPCService.Iface, ThriftClie
 
   @Override
   public TSStatus loadConfiguration() throws TException {
-    throw new UnsupportedOperationException("Please call 
submitLoadConfigurationTask instead");
+    throw new UnsupportedOperationException(
+        UNSUPPORTED_INVOCATION + ", please call submitLoadConfigurationTask 
instead");
   }
 
   @Override

Reply via email to