mahaitao617 commented on code in PR #5958:
URL: https://github.com/apache/rocketmq/pull/5958#discussion_r1094056948


##########
tools/src/main/java/org/apache/rocketmq/tools/command/ha/GetSyncStateSetSubCommand.java:
##########
@@ -123,13 +123,23 @@ private void printData(String controllerAddress, 
List<String> brokerNames,
                     next.getKey(), next.getValue().getMasterAddress(), 
next.getValue().getMasterEpoch(), next.getValue().getSyncStateSetEpoch(),
                     inSyncReplicas.size());
                 for (BrokerReplicasInfo.ReplicaIdentity member : 
inSyncReplicas) {
-                    System.out.printf("\n InSyncReplica:\t%s\n", 
member.toString());
+                    System.out.printf("\n InSyncReplica:\t%s\n", 
member.toString() + acquireBrokerStatus(defaultMQAdminExt, 
member.getAddress()));
                 }
 
                 for (BrokerReplicasInfo.ReplicaIdentity member : 
notInSyncReplicas) {
-                    System.out.printf("\n NotInSyncReplica:\t%s\n", 
member.toString());
+                    System.out.printf("\n NotInSyncReplica:\t%s\n", 
member.toString() + acquireBrokerStatus(defaultMQAdminExt, 
member.getAddress()));

Review Comment:
   i have fixed it



##########
tools/src/main/java/org/apache/rocketmq/tools/command/ha/GetSyncStateSetSubCommand.java:
##########
@@ -123,13 +123,23 @@ private void printData(String controllerAddress, 
List<String> brokerNames,
                     next.getKey(), next.getValue().getMasterAddress(), 
next.getValue().getMasterEpoch(), next.getValue().getSyncStateSetEpoch(),
                     inSyncReplicas.size());
                 for (BrokerReplicasInfo.ReplicaIdentity member : 
inSyncReplicas) {
-                    System.out.printf("\n InSyncReplica:\t%s\n", 
member.toString());
+                    System.out.printf("\n InSyncReplica:\t%s\n", 
member.toString() + acquireBrokerStatus(defaultMQAdminExt, 
member.getAddress()));
                 }
 
                 for (BrokerReplicasInfo.ReplicaIdentity member : 
notInSyncReplicas) {
-                    System.out.printf("\n NotInSyncReplica:\t%s\n", 
member.toString());
+                    System.out.printf("\n NotInSyncReplica:\t%s\n", 
member.toString() + acquireBrokerStatus(defaultMQAdminExt, 
member.getAddress()));
                 }
             }
         }
     }
+
+    private String acquireBrokerStatus(DefaultMQAdminExt 
defaultMQAdminExt,String brokerAddr) {
+        String status = " online";

Review Comment:
   i have fixed it



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to