fapifta commented on a change in pull request #1494:
URL: https://github.com/apache/ozone/pull/1494#discussion_r543050296



##########
File path: 
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
##########
@@ -164,6 +167,27 @@ public void notifyTermIndexUpdated(long currentTerm, long 
index) {
     computeAndUpdateLastAppliedIndex(index, currentTerm, null, false);
   }
 
+  /**
+   * Called from Ratis to notify state machine about configuration changes.
+   */
+  @Override
+  public void notifyConfigurationChanged(long term, long index,
+      RaftConfigurationProto newRaftConfiguration) {
+    List<RaftPeerProto> newPeers = newRaftConfiguration.getPeersList();
+    LOG.info("Received Configuration change notification from Ratis. New Peer" 
+
+        " list:\n{}", newPeers);
+    for (RaftProtos.RaftPeerProto raftPeerProto : newPeers) {
+      String omNodeId = RaftPeerId.valueOf(raftPeerProto.getId()).toString();
+      if (!ozoneManager.doesPeerExist(omNodeId)) {
+        LOG.info("Adding new OM {} to the cluster.", omNodeId);
+        ozoneManager.addNewOMNode(omNodeId);
+      } else if(LOG.isDebugEnabled()) {

Review comment:
       nit: again old log4j habit




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



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

Reply via email to