bharatviswa504 commented on a change in pull request #1494:
URL: https://github.com/apache/ozone/pull/1494#discussion_r640507618
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/ratis/OzoneManagerStateMachine.java
##########
@@ -166,6 +167,29 @@ public void notifyTermIndexUpdated(long currentTerm, long
index) {
computeAndUpdateLastAppliedIndex(index, currentTerm, null, false);
}
+ /**
+ * Called to notify state machine about configuration changes.
+ * Configurations changes include addition of newly bootstrapped OM.
+ */
+ @Override
+ public void notifyConfigurationChanged(long term, long index,
+ RaftProtos.RaftConfigurationProto newRaftConfiguration) {
+ List<RaftProtos.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 Peer list.", omNodeId);
+ ozoneManager.addOMNodeToPeers(omNodeId);
Review comment:
Looks like this is taken care of. With this // Load new
configuration object to read in new peer information
setConfiguration(new OzoneConfiguration());
So, here it reloads config from disk again? Have you tried on a
docker/cluster to verify this. (From reading code looks like config load has
taken care) Just curious.
The only thing is when they add a new node, the users should change the
config on all nodes.
--
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]