You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2019/12/09 14:01:37 UTC

[GitHub] [hadoop-ozone] nandakumar131 commented on a change in pull request #313: HDDS-2242. Avoid unnecessary rpc needed to discover the pipeline leader.

nandakumar131 commented on a change in pull request #313: HDDS-2242. Avoid unnecessary rpc needed to discover the pipeline leader.
URL: https://github.com/apache/hadoop-ozone/pull/313#discussion_r355463573
 
 

 ##########
 File path: hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/Pipeline.java
 ##########
 @@ -132,6 +133,25 @@ void setLeaderId(UUID leaderId) {
     return new ArrayList<>(nodeStatus.keySet());
   }
 
+  /**
+   * Returns the leader if found else defaults to closest node.
+   *
+   * @return {@link DatanodeDetails}
+   */
+  public DatanodeDetails getLeaderNodeIfPresent() throws IOException {
 
 Review comment:
   We can rename this to `getLeader`, the javadoc already describes the behavior if the leader is not set. Ideally, the leader should be set in a pipeline.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org