You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2021/01/14 01:38:48 UTC

[GitHub] [iotdb] jt2594838 commented on a change in pull request #2483: Add authentication in the node tool and modify the node tools doc

jt2594838 commented on a change in pull request #2483:
URL: https://github.com/apache/iotdb/pull/2483#discussion_r556987463



##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/function/NodeToolCmd.java
##########
@@ -72,7 +83,9 @@ private MBeanServerConnection connect() {
     try {
       String jmxURL = String.format(JMX_URL_FORMAT, host, port);
       JMXServiceURL serviceURL = new JMXServiceURL(jmxURL);
-      JMXConnector connector = JMXConnectorFactory.connect(serviceURL);
+      Map<String, Object> environment = new HashMap<>(1);

Review comment:
       `Collections.singletonMap` may be enough in this case

##########
File path: cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/function/NodeToolCmd.java
##########
@@ -84,7 +97,7 @@ private MBeanServerConnection connect() {
     return mbsc;
   }
 
-  String nodeToString(Node node){
+  String nodeToString(Node node) {
     return String.format("%s:%d:%d", node.getIp(), node.getMetaPort(), node.getDataPort());

Review comment:
       I think we can also add `clientPort` here.

##########
File path: docs/UserGuide/System Tools/NodeTool.md
##########
@@ -34,7 +37,10 @@ you can specify the IP address and port of the cluster during startup.
 IP is the IP (or hostname) of the node that you expect to connect to,
 and port is the JMX service port specified when the IoTDB cluster is started.
 
-The default values are 127.0.0.1 and 31999, respectively.
+The default values are `127.0.0.1` and `31999`, respectively.
+
+When JMX authentication service is enabled, the user name and password of JMX service should be specified. 
+The default values are `iotdb` and `passw!d`, respectively.

Review comment:
       Add the option names (-u and -pw) here.




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org