This is an automated email from the ASF dual-hosted git repository. elek pushed a commit to branch HDDS-1868 in repository https://gitbox.apache.org/repos/asf/hadoop-ozone.git
commit 73d072cd6749b71b46fba611c0d4340142814793 Author: Siddharth Wagle <swa...@hortonworks.com> AuthorDate: Tue Oct 8 13:15:28 2019 -0700 HDDS-1868. Set leaderId whenever available to address leader re-election scenario. --- .../org/apache/hadoop/hdds/scm/pipeline/PipelineReportHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineReportHandler.java b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineReportHandler.java index 10d40d9..a9534ca 100644 --- a/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineReportHandler.java +++ b/hadoop-hdds/server-scm/src/main/java/org/apache/hadoop/hdds/scm/pipeline/PipelineReportHandler.java @@ -113,6 +113,8 @@ public class PipelineReportHandler implements reportedLeadersForPipeline.computeIfAbsent(pipelineID, k -> new HashMap<>()); ids.put(dn.getUuid(), report.getLeaderID()); + pipeline.setLeaderId( + RaftPeerId.valueOf(report.getLeaderID().toString())); } if (pipeline.getPipelineState() == Pipeline.PipelineState.ALLOCATED) { @@ -124,8 +126,6 @@ public class PipelineReportHandler implements leaderIdPairs.values().stream().distinct().count() == 1) { // All datanodes reported same leader pipelineManager.openPipeline(pipelineID); - pipeline.setLeaderId( - RaftPeerId.valueOf(report.getLeaderID().toString())); } } else { // In OPEN state case just report the datanode --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-commits-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-commits-h...@hadoop.apache.org