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 2021/03/22 10:23:02 UTC

[GitHub] [ozone] elek commented on a change in pull request #2055: HDDS-4954. Add replicaIndex to the RPC protocols

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



##########
File path: hadoop-hdds/interface-client/src/main/proto/DatanodeClientProtocol.proto
##########
@@ -393,6 +394,7 @@ message  WriteChunkRequestProto  {
   required DatanodeBlockID blockID = 1;
   required ChunkInfo chunkData = 2;
   optional bytes data = 3;
+  optional int32 containerinstanceIndex = 4;

Review comment:
       Fixed with moving this field to the `DatanodeBlockID`

##########
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:
       Sure, I added a detailed javadoc.




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



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