You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ea...@apache.org on 2019/04/18 10:36:35 UTC
[incubator-iotdb] branch cluster_nodetool updated: add Host
This is an automated email from the ASF dual-hosted git repository.
east pushed a commit to branch cluster_nodetool
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/cluster_nodetool by this push:
new e69790f add Host
e69790f is described below
commit e69790f7406419cf14f4b1225d29da9194adf5e9
Author: mdf369 <95...@qq.com>
AuthorDate: Thu Apr 18 18:36:19 2019 +0800
add Host
---
cluster/src/main/java/org/apache/iotdb/cluster/utils/RaftUtils.java | 2 +-
iotdb-cli/src/main/java/org/apache/iotdb/cli/service/Host.java | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/cluster/src/main/java/org/apache/iotdb/cluster/utils/RaftUtils.java b/cluster/src/main/java/org/apache/iotdb/cluster/utils/RaftUtils.java
index 1b95ad5..01f0559 100644
--- a/cluster/src/main/java/org/apache/iotdb/cluster/utils/RaftUtils.java
+++ b/cluster/src/main/java/org/apache/iotdb/cluster/utils/RaftUtils.java
@@ -393,7 +393,7 @@ public class RaftUtils {
Map<String[], String[]> res = new HashMap<>();
int index = 0;
for (Entry<PhysicalNode[], List<String>> entry : groupSGMap.entrySet()) {
- res.put(groupIps[index], (String[]) entry.getValue().toArray());
+ res.put(groupIps[index], entry.getValue().toArray(new String[entry.getValue().size()]));
}
return res;
}
diff --git a/iotdb-cli/src/main/java/org/apache/iotdb/cli/service/Host.java b/iotdb-cli/src/main/java/org/apache/iotdb/cli/service/Host.java
index 2093f21..040d5fd 100644
--- a/iotdb-cli/src/main/java/org/apache/iotdb/cli/service/Host.java
+++ b/iotdb-cli/src/main/java/org/apache/iotdb/cli/service/Host.java
@@ -29,8 +29,8 @@ import org.apache.iotdb.cluster.service.ClusterMonitorMBean;
@Command(name = "host", description = "Print all data partitions information which specific host belongs to")
public class Host extends NodeToolCmd {
- @Option(title = "ip", name = {"-i", "--ip"}, required = true, description = "Specify the host ip for accurate hosts information")
- private String ip = null;
+ @Option(title = "ip", name = {"-i", "--ip"}, description = "Specify the host ip for accurate hosts information")
+ private String ip = "127.0.0.1";
@Option(title = "port", name = {"-p", "--port"}, description = "Specify the host port for accurate hosts information")
private int port = -1;