zhaohai1299002788 commented on a change in pull request #3595:
URL: https://github.com/apache/rocketmq/pull/3595#discussion_r763671092



##########
File path: 
tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java
##########
@@ -83,19 +86,19 @@ public void execute(final CommandLine commandLine, final 
Options options,
                 Map<String, List<String>> masterAndSlaveMap
                     = 
CommandUtil.fetchMasterAndSlaveDistinguish(defaultMQAdminExt, clusterName);
 
-                for (String masterAddr : masterAndSlaveMap.keySet()) {
+                for (Entry<String, List<String>> masterAddrEntry : 
masterAndSlaveMap.entrySet()) {

Review comment:
       already edited

##########
File path: 
tools/src/main/java/org/apache/rocketmq/tools/command/broker/GetBrokerConfigCommand.java
##########
@@ -121,8 +124,8 @@ protected void getAndPrint(final MQAdminExt 
defaultMQAdminExt, final String prin
             return;
         }
 
-        for (Object key : properties.keySet()) {
-            System.out.printf("%-50s=  %s\n", key, properties.get(key));
+        for (Entry<Object, Object> keyEntry : properties.entrySet()) {
+            System.out.printf("%-50s=  %s\n", keyEntry.getKey(), 
keyEntry.getValue());

Review comment:
       already edited

##########
File path: 
tools/src/main/java/org/apache/rocketmq/tools/command/consumer/GetConsumerConfigSubCommand.java
##########
@@ -63,14 +65,14 @@ public void execute(CommandLine commandLine, Options 
options,
             List<ConsumerConfigInfo> consumerConfigInfoList = new 
ArrayList<>();
             ClusterInfo clusterInfo = adminExt.examineBrokerClusterInfo();
             Map<String, Set<String>> clusterAddrTable = 
clusterInfo.getClusterAddrTable();
-            for (String brokerName : 
clusterInfo.getBrokerAddrTable().keySet()) {
-                String clusterName = this.getClusterName(brokerName, 
clusterAddrTable);
-                String brokerAddress = 
clusterInfo.getBrokerAddrTable().get(brokerName).selectBrokerAddr();
+            for (Entry<String, BrokerData> brokerNameEntry : 
clusterInfo.getBrokerAddrTable().entrySet()) {

Review comment:
       already edited

##########
File path: 
tools/src/main/java/org/apache/rocketmq/tools/command/export/ExportConfigsCommand.java
##########
@@ -79,10 +81,10 @@ public void execute(CommandLine commandLine, Options 
options, RPCHook rpcHook)
             Map<String, Properties> brokerConfigs = new HashMap<>();
             Map<String, List<String>> masterAndSlaveMap
                 = 
CommandUtil.fetchMasterAndSlaveDistinguish(defaultMQAdminExt, clusterName);
-            for (String masterAddr : masterAndSlaveMap.keySet()) {
-                Properties masterProperties = 
defaultMQAdminExt.getBrokerConfig(masterAddr);
+            for (Entry<String, List<String>> masterAddrEntry : 
masterAndSlaveMap.entrySet()) {

Review comment:
       already edited

##########
File path: 
tools/src/main/java/org/apache/rocketmq/tools/command/namesrv/GetNamesrvConfigCommand.java
##########
@@ -66,11 +69,11 @@ public void execute(final CommandLine commandLine, final 
Options options,
 
             Map<String, Properties> nameServerConfigs = 
defaultMQAdminExt.getNameServerConfig(serverList);
 
-            for (String server : nameServerConfigs.keySet()) {
+            for (Entry<String, Properties> serverEntry : 
nameServerConfigs.entrySet()) {

Review comment:
       already edited




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