You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2023/08/09 09:00:11 UTC

[iotdb] branch fix_startup_error_log created (now 9b6daa63c40)

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

haonan pushed a change to branch fix_startup_error_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at 9b6daa63c40 Fix error log when start confignode and datanode

This branch includes the following new commits:

     new 9b6daa63c40 Fix error log when start confignode and datanode

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[iotdb] 01/01: Fix error log when start confignode and datanode

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

haonan pushed a commit to branch fix_startup_error_log
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 9b6daa63c408ac73f2a54d65e6a6add1711be322
Author: HTHou <hh...@outlook.com>
AuthorDate: Wed Aug 9 16:59:53 2023 +0800

    Fix error log when start confignode and datanode
---
 .../iotdb/confignode/service/thrift/ConfigNodeRPCService.java     | 4 ++--
 .../iotdb/consensus/iot/service/IoTConsensusRPCService.java       | 8 ++++++--
 .../apache/iotdb/commons/client/mock/MockInternalRPCService.java  | 4 ++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java
index 824b02b3e23..b7840338101 100644
--- a/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java
+++ b/iotdb-core/confignode/src/main/java/org/apache/iotdb/confignode/service/thrift/ConfigNodeRPCService.java
@@ -49,9 +49,9 @@ public class ConfigNodeRPCService extends ThriftService implements ConfigNodeRPC
     this.configNodeRPCServiceProcessor =
         (ConfigNodeRPCServiceProcessor) configNodeRPCServerProcessor;
 
+    String packageName = this.getClass().getPackage().toString().split(",")[0];
     super.mbeanName =
-        String.format(
-            "%s:%s=%s", this.getClass().getPackage(), IoTDBConstant.JMX_TYPE, getID().getJmxName());
+        String.format("%s:%s=%s", packageName, IoTDBConstant.JMX_TYPE, getID().getJmxName());
     super.initSyncedServiceImpl(this.configNodeRPCServiceProcessor);
   }
 
diff --git a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/service/IoTConsensusRPCService.java b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/service/IoTConsensusRPCService.java
index f80a0b8162c..578af535143 100644
--- a/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/service/IoTConsensusRPCService.java
+++ b/iotdb-core/consensus/src/main/java/org/apache/iotdb/consensus/iot/service/IoTConsensusRPCService.java
@@ -30,11 +30,15 @@ import org.apache.iotdb.consensus.config.IoTConsensusConfig;
 import org.apache.iotdb.consensus.iot.thrift.IoTConsensusIService;
 
 import org.apache.thrift.TBaseAsyncProcessor;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import java.lang.reflect.InvocationTargetException;
 
 public class IoTConsensusRPCService extends ThriftService implements IoTConsensusRPCServiceMBean {
 
+  private static final Logger logger = LoggerFactory.getLogger(IoTConsensusRPCService.class);
+
   private final TEndPoint thisNode;
   private final IoTConsensusConfig config;
   private IoTConsensusRPCServiceProcessor iotConsensusRPCServiceProcessor;
@@ -53,9 +57,9 @@ public class IoTConsensusRPCService extends ThriftService implements IoTConsensu
   public void initAsyncedServiceImpl(Object iotConsensusRPCServiceProcessor) {
     this.iotConsensusRPCServiceProcessor =
         (IoTConsensusRPCServiceProcessor) iotConsensusRPCServiceProcessor;
+    String packageName = this.getClass().getPackage().toString().split(",")[0];
     super.mbeanName =
-        String.format(
-            "%s:%s=%s", this.getClass().getPackage(), IoTDBConstant.JMX_TYPE, getID().getJmxName());
+        String.format("%s:%s=%s", packageName, IoTDBConstant.JMX_TYPE, getID().getJmxName());
     super.initAsyncedServiceImpl(this.iotConsensusRPCServiceProcessor);
   }
 
diff --git a/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/client/mock/MockInternalRPCService.java b/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/client/mock/MockInternalRPCService.java
index c4a6b4d3cc0..d3141eb2cb3 100644
--- a/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/client/mock/MockInternalRPCService.java
+++ b/iotdb-core/node-commons/src/test/java/org/apache/iotdb/commons/client/mock/MockInternalRPCService.java
@@ -49,9 +49,9 @@ public class MockInternalRPCService extends ThriftService implements MockInterna
   @Override
   public void initSyncedServiceImpl(Object mockedProcessor) {
     this.mockedProcessor = (IDataNodeRPCService.Iface) mockedProcessor;
+    String packageName = this.getClass().getPackage().toString().split(",")[0];
     super.mbeanName =
-        String.format(
-            "%s:%s=%s", this.getClass().getPackage(), IoTDBConstant.JMX_TYPE, getID().getJmxName());
+        String.format("%s:%s=%s", packageName, IoTDBConstant.JMX_TYPE, getID().getJmxName());
     super.initSyncedServiceImpl(this.mockedProcessor);
   }