fanhualta commented on a change in pull request #3191:
URL: https://github.com/apache/iotdb/pull/3191#discussion_r640759465
##########
File path:
cluster/src/main/java/org/apache/iotdb/cluster/utils/nodetool/ClusterMonitor.java
##########
@@ -66,9 +77,67 @@ public void start() throws StartupException {
}
@Override
+ public List<Pair<Node, NodeCharacter>> getMetaGroup() {
+ MetaGroupMember metaMember = getMetaGroupMember();
+ if (metaMember == null || metaMember.getPartitionTable() == null) {
+ return null;
+ }
+ List<Pair<Node, NodeCharacter>> res = new ArrayList<>();
+ for (Node node : metaMember.getPartitionTable().getAllNodes()) {
+ if (node.equals(metaMember.getLeader())) {
+ res.add(new Pair<>(node, NodeCharacter.LEADER));
+ } else {
+ res.add(new Pair<>(node, NodeCharacter.FOLLOWER));
+ }
+ }
+ return res;
Review comment:
fixed
--
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:
[email protected]