nandakumar131 commented on a change in pull request #23: HDDS-1868. Ozone 
pipelines should be marked as ready only after the leader election is complete.
URL: https://github.com/apache/hadoop-ozone/pull/23#discussion_r335553429
 
 

 ##########
 File path: 
hadoop-hdds/container-service/src/main/java/org/apache/hadoop/ozone/container/common/transport/server/ratis/XceiverServerRatis.java
 ##########
 @@ -686,4 +696,17 @@ void notifyGroupRemove(RaftGroupId gid) {
   void notifyGroupAdd(RaftGroupId gid) {
     raftGids.add(gid);
   }
+
+  void handleLeaderChangedNotification(RaftGroupMemberId groupMemberId,
+                                       RaftPeerId raftPeerId) {
+    LOG.info("Leader change notification received for group: {} with new " +
+        "leaderId: {}", groupMemberId.getGroupId(), raftPeerId);
+    // Save the reported leader to be sent with the report to SCM
+    leaderIdMap.put(groupMemberId.getGroupId(), raftPeerId);
+    // Publish new reports with leaderID
+    context.getParent().getReportManager().getReportPublisher(
+        PipelineReportsProto.class).run();
 
 Review comment:
   Instead of modifying ReportManager, you directly add PipelineReport to 
context
   
```context.addReport(context.getParent().getContainer().getPipelineReport())```

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-dev-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org

Reply via email to