harryteng9527 commented on code in PR #7388:
URL: https://github.com/apache/ozone/pull/7388#discussion_r1829356838


##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java:
##########
@@ -216,7 +217,9 @@ public void notifyConfigurationChanged(long term, long 
index,
     List<RaftProtos.RaftPeerProto> newPeers =
         newRaftConfiguration.getPeersList();
     LOG.info("Received Configuration change notification from Ratis. New Peer" 
+
-        " list:\n{}", newPeers);
+        " list:\n[{}\n]", newPeers.stream().map(peer ->
+            String.format("id: \"%s\"%n address: \"%s\"", 
peer.getId().toStringUtf8(), peer.getAddress()))
+        .collect(Collectors.joining("\n, ")));

Review Comment:
   I originally intended to maintain the original log style. Thanks for 
reviewing!
   
   After the modification, the current log:
   ```=bash
   Received Configuration change notification from Ratis. New Peer list: [id: 
"omNode-3" address: "localhost:15015", id: "omNode-1" address: 
"localhost:15007", id: "omNode-2" address: "localhost:15011"]
   ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to