mukul1987 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_r336831346
########## File path: hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/SCMPipelineManager.java ########## @@ -288,6 +294,28 @@ public int getNumberOfContainers(PipelineID pipelineID) throws IOException { return stateManager.getNumberOfContainers(pipelineID); } + @Override + public void processReportedLeaderInfo(PipelineID pipelineID, + DatanodeDetails dn, ByteString leaderID) throws IOException { + Pipeline pipeline = stateManager.getPipeline(pipelineID); + Map<UUID, ByteString> ids = + reportedLeadersForPipeline.computeIfAbsent(pipelineID, + k -> new HashMap<>()); + + ids.put(dn.getUuid(), leaderID); Review comment: It will be better to maintain node->leaderId map inside the Pipeline.java class. The information is pipeline specific and hence should be kept there. ---------------------------------------------------------------- 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