You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ta...@apache.org on 2021/07/20 01:31:13 UTC

[iotdb] 01/01: modify NodeTool user to root

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

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

commit 8537768efc315de9c46c0b72f640bc60d5595e6d
Author: lta <li...@163.com>
AuthorDate: Thu Jun 24 00:54:52 2021 +0800

    modify NodeTool user to root
---
 .../org/apache/iotdb/cluster/utils/nodetool/function/NodeToolCmd.java   | 2 +-
 .../src/main/java/org/apache/iotdb/db/metadata/logfile/MLogWriter.java  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/function/NodeToolCmd.java b/cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/function/NodeToolCmd.java
index a7b2986..793ffae 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/function/NodeToolCmd.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/function/NodeToolCmd.java
@@ -61,7 +61,7 @@ public abstract class NodeToolCmd implements Runnable {
       type = OptionType.GLOBAL,
       name = {"-u", "--user"},
       description = "The username to access the remote jmx")
-  private String user = "iotdb";
+  private String user = "root";
 
   @Option(
       type = OptionType.GLOBAL,
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogWriter.java b/server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogWriter.java
index ecd7d48..241985f 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogWriter.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/logfile/MLogWriter.java
@@ -293,7 +293,7 @@ public class MLogWriter implements AutoCloseable {
   }
 
   /** only used for initialize a mlog file writer. */
-  public void setLogNum(int number) {
+  public synchronized void setLogNum(int number) {
     logNum = number;
   }