diff --git a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java index aa7211fa036a..6a5274ca01f5 100644 --- a/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java +++ b/hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java @@ -215,8 +215,15 @@ public void notifyConfigurationChanged(long term, long index, RaftProtos.RaftConfigurationProto newRaftConfiguration) { List newPeers = newRaftConfiguration.getPeersList(); - LOG.info("Received Configuration change notification from Ratis. New Peer" + - " list:\n{}", newPeers); + final StringBuilder logBuilder = new StringBuilder(1024) + .append("notifyConfigurationChanged from Ratis: term=").append(term) + .append(", index=").append(index) + .append(", New Peer list: "); + newPeers.forEach(peer -> logBuilder.append(peer.getId().toStringUtf8()) + .append("(") + .append(peer.getAddress()) + .append("), ")); + LOG.info(logBuilder.substring(0, logBuilder.length() - 2)); List newPeerIds = new ArrayList<>(); for (RaftProtos.RaftPeerProto raftPeerProto : newPeers) {