umamaheswararao commented on a change in pull request #2055:
URL: https://github.com/apache/ozone/pull/2055#discussion_r597873758



##########
File path: 
hadoop-hdds/common/src/main/java/org/apache/hadoop/hdds/scm/pipeline/Pipeline.java
##########
@@ -186,6 +189,10 @@ public boolean sameDatanodes(Pipeline pipeline) {
     return getNodeSet().equals(pipeline.getNodeSet());
   }
 
+  public int getReplicaIndex(DatanodeDetails dn) {
+    return replicaIndexes.getOrDefault(dn, 0);

Review comment:
       Could you please add a comment that, returning 0 means, it's just an 
invalid index and this API for EC. Because mostly we may not use this kind of 
API in non-EC flow, we may invoke this API in EC flow to get a particular DN 
index. 




-- 
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]

Reply via email to